agentleFS
fal-ai-communityfal-ai-community/genmedia-cli/AGENTS.md

genmedia-cli

AGENTS.md82 starsChanged 6 months agoMITView on GitHub

These instructions apply to the repository root unless a deeper AGENTS.md overrides them. The web/ app has its own guidance in web/AGENTS.md. Releases are driven by version tags (vX.Y.Z). Pushing a matching tag triggers .github/workflows/release.yml, which builds cross-platform binaries and publishes a GitHub Release with checksums. The workflow verifies package.json version matches the tag and fails the build on mismatch.

  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

19 rules. About 0 are common, 11 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep changes small and focused.

    line 18
  2. Distinctive:

    Prefer updating shared helpers over duplicating logic across commands.

    line 19
  3. Very specific:

    Use bun for repo scripts and local execution.

    line 20
  4. Distinctive:

    Follow Biome formatting conventions already present in the codebase.

    line 21
  5. Very specific:

    Put shared request or parsing logic in src/lib/ when it is used by more than one command.

    line 27
  6. Distinctive:

    Prefer descriptive argument names that match the public CLI surface.

    line 28
  7. Very specific:

    Prefer output(), outputRawJson(), error(), isJsonOutput(), and related helpers from src/lib/output.ts instead of ad hoc console.log …

    line 34
  8. Distinctive:

    Only write custom pretty-mode terminal output when the command needs a richer TTY presentation.

    line 35
  9. Distinctive:

    Avoid adding interactive prompts to non-interactive commands.

    line 36
  10. Distinctive:

    Keep environment-variable behavior documented and consistent with help text and README examples.

    line 41
  11. Very specific:

    When changing command behavior, update the JSON help schema in src/index.ts if the public interface changes.

    line 42
  12. Very specific:

    All update logic lives in src/lib/updater.ts.

    line 46
  13. Very specific:

    Treat each directory in skills/ as a published bundle.

    line 51
  14. Very specific:

    If you add or modify bundled skills, regenerate or verify skills/index.json with bun run skills:index or bun run skills:index:check.

    line 52
  15. Very specific:

    Keep skill names, descriptions, and directory names in sync with SKILL.md frontmatter.

    line 53
  16. Distinctive:

    Prefer the smallest useful validation first.

    line 57
  17. Distinctive:

    Run broader build validation when changing packaging, generated artifacts, or command registration.

    line 63
  18. Distinctive:

    Update README.md when adding commands, flags, environment variables, install behavior, or agent workflow changes.

    line 67
  19. Distinctive:

    Keep examples aligned with the actual CLI output and command names.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

genmedia CLI agent guide

Scope

These instructions apply to the repository root unless a deeper AGENTS.md overrides them. The web/ app has its own guidance in web/AGENTS.md.

Repository shape

  • src/index.ts is the CLI entrypoint and lazy-loads subcommands.
  • src/commands/ contains one file per command or command group.
  • src/lib/ contains shared runtime helpers for config, API access, output, and UI.
  • skills/ contains bundled skills. skills/index.json is generated from those directories.
  • scripts/ contains build and maintenance scripts.
  • web/ is a separate app with additional rules.

Working conventions

  • Keep changes small and focused. Match the existing TypeScript + ESM style.
  • Prefer updating shared helpers over duplicating logic across commands.
  • Use bun for repo scripts and local execution. Do not introduce npm or pnpm workflows here unless the repo already requires them.
  • Follow Biome formatting conventions already present in the codebase.

CLI command conventions

  • Define commands with defineCommand from citty.
  • Register new top-level commands in src/index.ts using the existing lazy-import pattern.
  • Put shared request or parsing logic in src/lib/ when it is used by more than one command.
  • Prefer descriptive argument names that match the public CLI surface.
  • Preserve existing aliases and compatibility behavior unless the task explicitly changes them.

Output and UX

  • This CLI is agent-first: preserve structured JSON output for --json and non-TTY usage.
  • Prefer output(), outputRawJson(), error(), isJsonOutput(), and related helpers from src/lib/output.ts instead of ad hoc console.log handling.
  • Only write custom pretty-mode terminal output when the command needs a richer TTY presentation.
  • Avoid adding interactive prompts to non-interactive commands.

API and config

  • Reuse helpers from src/lib/api.ts, src/lib/config.ts, and src/lib/env.ts instead of reimplementing headers, auth, or config loading.
  • Keep environment-variable behavior documented and consistent with help text and README examples.
  • When changing command behavior, update the JSON help schema in src/index.ts if the public interface changes.

Self-update

  • All update logic lives in src/lib/updater.ts. The update command and the background check in src/index.ts both go through it — don't reimplement download/checksum/swap logic elsewhere.
  • Startup in src/index.ts runs preSwapPendingUpdate() first (atomic swap of a staged .new binary) and may fire maybeTriggerBackgroundUpdate() (detached subprocess, rate-limited to once per hour, TTY-only). Respect GENMEDIA_NO_UPDATE=1 and config.autoUpdate in any update-related code.

Skills

  • Treat each directory in skills/ as a published bundle.
  • If you add or modify bundled skills, regenerate or verify skills/index.json with bun run skills:index or bun run skills:index:check.
  • Keep skill names, descriptions, and directory names in sync with SKILL.md frontmatter.

Validation

  • Prefer the smallest useful validation first.
  • Common checks:
    • bun run typecheck
    • bun run check
    • bun run build
    • bun run skills:index:check when touching skills/
  • Run broader build validation when changing packaging, generated artifacts, or command registration.

Documentation

  • Update README.md when adding commands, flags, environment variables, install behavior, or agent workflow changes.
  • Keep examples aligned with the actual CLI output and command names.

Releasing

Releases are driven by version tags (vX.Y.Z). Pushing a matching tag triggers .github/workflows/release.yml, which builds cross-platform binaries and publishes a GitHub Release with checksums. The workflow verifies package.json version matches the tag and fails the build on mismatch.

Steps:

  1. Bump version in package.json to the new X.Y.Z.
  2. Commit with chore: X.Y.Z release.
  3. Push main: git push origin main.
  4. Tag and push: git tag vX.Y.Z && git push origin vX.Y.Z.

Pre-release versions (e.g. 0.4.0-alpha.0) are auto-detected from the version string and marked as pre-release on GitHub.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.