command

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package command implements the okf subcommands (lint, index, fmt, new, graph) and their shared plumbing: global flags, bundle discovery/loading, and the human/JSON renderers. Each command returns an exit code and an error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fmt

func Fmt(w io.Writer, args []string) (int, error)

Fmt normalizes frontmatter key order, timestamps, citation numbering and link style. --check reports which files would change (non-zero exit if any); --write applies them.

func Gaps

func Gaps(w io.Writer, args []string) (int, error)

Gaps reports concepts semantically near the seed but not linked to it — the candidate cross-links / bridges to refine a topic. Detection is deterministic; composing the bridge is the agent's job. The algorithm lives in internal/gaps; this command only parses flags, merges config, and renders the result.

func Graph

func Graph(w io.Writer, args []string) (int, error)

Graph emits the concept link graph as JSON (--format json) or Graphviz dot.

func Index

func Index(w io.Writer, args []string) (int, error)

Index verifies (--check, default) or regenerates (--write) index.md files.

func Lint

func Lint(w io.Writer, args []string) (int, error)

Lint runs the rule catalog over the bundle. It is the anchor command.

func New

func New(w io.Writer, args []string) (int, error)

New scaffolds a conformant concept page (frontmatter + a Citations stub), preventing drift at creation.

func Skill

func Skill(w io.Writer, args []string) (int, error)

Skill prints the bundled agent skill to stdout, so a project can install it, e.g. `okftool skill > .claude/skills/okftool/SKILL.md`.

func SkillMarkdown

func SkillMarkdown() string

SkillMarkdown returns the bundled agent skill as a Claude Code SKILL.md.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL