agentleFS
neilotooleneilotoole/sq/cli/AGENTS.md

sq / cli

AGENTS.md2.6k starsChanged 12 days agoMITView on GitHub

Conventions specific to the cli package: cobra command construction, flags, shell completion, and output writers. Repo-wide rules in AGENTS.md still apply here. Every command that accepts arguments must offer shell completion via the cobra command's ValidArgsFunction. Completion is part of the command, not an optional extra: a new command, or a new positional argument on an existing one, is not done until its arguments tab-complete. Reuse the helpers in complete.go rather than hand-rolling completion: - Source handles: completeHandle(maxVals, includeActive), or…

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

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every command that accepts arguments must offer shell completion via the cobra command's ValidArgsFunction.

    line 9
  2. Very specific:

    Add a completion test with the command, using the testComplete helper (see the existing *_Completion tests).

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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

AGENTS.md (cli/)

Conventions specific to the cli package: cobra command construction, flags, shell completion, and output writers. Repo-wide rules in AGENTS.md still apply here.

Shell completion

Every command that accepts arguments must offer shell completion via the cobra command's ValidArgsFunction. Completion is part of the command, not an optional extra: a new command, or a new positional argument on an existing one, is not done until its arguments tab-complete.

Reuse the helpers in complete.go rather than hand-rolling completion:

  • Source handles: completeHandle(maxVals, includeActive), or completeHandleOrGroup where a group is also valid.
  • Keyring entry paths: completeKeyringPath.
  • Other values (booleans, catalogs, schemas, drivers): the matching complete* helper.

Cap positional completion at the number of args the command takes (maxVals), and set includeActive by whether the @active shortcut is a sensible target.

Commands with no positional arguments need no ValidArgsFunction. Arguments whose values are inherently free-form are likewise exempt, since there is nothing to enumerate: a new name the user invents, a literal value to store, an arbitrary SQL or SLQ query. For example, config keyring create PATH takes no completion for PATH, because it must be a new entry that does not yet exist; suggesting existing paths would only offer names the command rejects.

Add a completion test with the command, using the testComplete helper (see the existing *_Completion tests).

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 4 mentionsFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 1 mentionMay 2026: 4 mentionsJun 2026: 5 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 2 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the neilotoole/sq repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about neilotoole/sq

The biggest 5 of 44 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 44

Talked about on GitHub and Hacker News (44 times).

On GitHub · 43

38 more on GitHub

On Hacker News · 1

  • 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 28,693 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 repository8 other files it gives its agents.

Does it work?

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

Reviews can't be read right now.

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.