codes v0.1.2
codes v0.1.2
0.1.2 主要提升了 codes 在 Codex / Claude Code 会话中的可用性,以及大结果集查询时的可控性。这个版本新增了 skill 直接安装能力,并为仓库级查询命令补齐了分页支持。
主要变更
-
新增
codes skill install,可直接把内置 skill 安装到 Codex 或 Claude Code 的个人目录- 新命令为
codes skill install --target <codex|claude-code> [--force]。 --target codex会写入~/.codex/skills/code-search-cli/SKILL.md。--target claude-code会写入~/.claude/skills/code-search-cli/SKILL.md。- 已存在时默认拒绝覆盖,只有显式传入
--force才会覆盖,避免误改用户已有 skill。 codes skill print仍然保留,兼容现有通过 shell 重定向安装的用法。
- 新命令为
-
symbols/definition/references现在支持分页- 三个命令都支持
--limit和--offset。 --offset的语义是跳过前 N 条结果,再返回当前页,适合脚本和交互式翻页。- 这三类命令现在默认
--limit=100,避免在符号量很大的仓库里一次性输出过多结果。 - text 输出在分页时会显示当前窗口和总数,例如
20 matches (showing 41-60 of 137)。 - json 输出新增
total、offset、limit字段,便于调用方做后续分页处理。
- 三个命令都支持
-
definition的分页顺序现在显式稳定- 之前
definition没有单独排序,理论上可能受索引内部顺序影响。 - 现在会在分页前按
path -> line -> column -> kind排序,使分页边界稳定。 - 这个排序只作用于精确名字匹配后的结果集,不会影响缓存构建或并行解析路径的性能。
- 之前
兼容性说明
- 这是一次向前兼容的增强版本。
- 未显式传入
--limit的symbols/definition/references现在默认只返回前 100 条;如需旧行为的“大量结果”,请显式传入更大的--limit。 codes skill print和现有查询参数仍然可用。
English
0.1.2 improves codes usability inside Codex / Claude Code workflows and makes large result sets easier to handle. This release adds direct skill installation and introduces pagination for repository-level search commands.
Highlights
-
New
codes skill installcommand for direct Codex / Claude Code skill installation- New command:
codes skill install --target <codex|claude-code> [--force]. --target codexwrites to~/.codex/skills/code-search-cli/SKILL.md.--target claude-codewrites to~/.claude/skills/code-search-cli/SKILL.md.- Existing files are preserved by default; overwrite requires an explicit
--force. codes skill printremains available, so shell-redirect based installation still works.
- New command:
-
Pagination is now available for
symbols,definition, andreferences- All three commands now support
--limitand--offset. --offsetskips the first N results before returning the current page, which works well for both scripting and interactive paging.- These commands now default to
--limit=100to avoid dumping excessively large result sets in symbol-heavy repositories. - Text output now shows the current window and total count, for example:
20 matches (showing 41-60 of 137). - JSON output now includes
total,offset, andlimitfields for downstream pagination logic.
- All three commands now support
-
definitionpagination order is now explicitly stable- Previously,
definitionhad no explicit sort of its own and could theoretically inherit index-internal ordering. - Results are now sorted by
path -> line -> column -> kindbefore pagination, making page boundaries stable. - This sort only runs on the exact-name result set, so it does not affect cache build or parallel parsing performance.
- Previously,
Compatibility
- This is a forward-compatible enhancement release.
- If you do not pass
--limit,symbols/definition/referencesnow return only the first 100 results by default. If you want larger result sets, pass a larger explicit--limit. codes skill printand all existing query flags remain available.
Full Changelog: 0.1.1...0.1.2