Skip to main content

Markdown and text file editor for Claude Code — saves 80-90% of tokens

Project description

TokSlash

Edit Markdown by section, not by file.

TokSlash brings structure-level editing to Claude Code. Instead of reading and rewriting entire files or using string-based Edit, it lets you read and modify specific sections by block ID — saving tokens and avoiding format corruption.


Quick Start — 5 步上手

1. 安装

pip install tokslash

2. 配置 Claude Code

tokslash install     # ← 注册 MCP 服务器 + 自动放行 hooks(只需一次)

3. 初始化项目

cd 你的项目/
tokslash init        # ← 把编辑规则写入 CLAUDE.md(每个项目运行一次)
tokslash reindex     # ← 建立 Markdown 文件索引

4. 验证安装

tokslash doctor      # ← 全绿表示一切正常

5. 激活 Pro(可选,免费版跳过)

tokslash activate --key YOUR-LICENSE-KEY

Buy Pro — ¥199 终身版 / $49 终身版

6. 重启 Claude Code

# 关闭当前 Claude Code 会话
# 重新进入项目目录,打开 Claude Code

TokSlash 会作为 MCP 工具自动出现。在 Claude Code 中说"改 README"它就会自动用 TokSlash。


在 Claude Code 中使用

Claude Code 会自动调用 TokSlash。你不需要记命令——正常说话就行:

用户:"更新 README 的安装步骤,添加 Python 3.12 支持"

Claude Code 自动:
  → list_blocks("README.md")        查看所有章节
  → read_block("<id>")              读取目标章节
  → replace_block("<id>", "...")    只替换目标章节

你也可以主动使用:

命令 用途 示例
list_blocks("文件.md") 查看文件有哪些章节 list_blocks("README.md")
read_block("块ID") 读一个章节 read_block("abc-123...")
replace_block("块ID", "新内容") 改一个章节 replace_block("abc-123...", "## 安装\n\n新内容")
find_blocks("文件.md", "关键词") 按标题搜索章节 find_blocks("README.md", "安装")
generate_toc("文件.md") 生成/更新目录 generate_toc("README.md")
move_block("源ID", "目标ID", "after") 移动章节(含子章节) move_block("id1", "id2", "after")
adjust_level("块ID", -1) 升级/降级标题(子标题同步) adjust_level("id1", -1)
md_edit("文件.md", "指令") 自然语言一步编辑 md_edit("README.md", "把 Python 3.10 改为 3.12")

何时 TokSlash 生效:

  • 文件超过 100 行
  • 文件有标题结构(# ## ### 等)
  • 你只需要修改一个或几个章节

何时用原生 Edit:

  • 文件小于 100 行
  • 改动只有 1-3 行
  • 文件没有标题结构

CLI 命令

命令 用途
tokslash install 注册 MCP 服务器 + hooks + .gitignore(全局,只需一次)
tokslash init 把编辑规则写入 CLAUDE.md(每个项目运行一次)
tokslash reindex 建立/刷新当前项目的索引
tokslash doctor 诊断所有配置问题
tokslash blocks README.md 查看文件的章节结构
tokslash status 查看索引状态 + 今日配额
tokslash stats 查看 token 节省统计
tokslash activate --key <key> 激活 Pro 许可证
tokslash --version 查看版本号

新增功能(V0.4.0)

功能 说明 免费版
md_generate_toc 自动生成/更新目录(<!-- toc --> 标记)
md_move_block 移动章节,含所有子章节(4 种位置模式) 🔒 Pro
md_adjust_level 升级/降级标题,子标题自动同步
Aha Moment 每次编辑显示 token + 金额节省
Python 3.13 兼容 cibuildwheel 自动检测 Python 版本

Free vs Pro

功能 免费版 Pro 版
结构化编辑 ✅ 50次/天 ✅ 无限
块级关键词搜索
安全引擎 + 自动备份
跨文件语义搜索
优先支持
终身更新

免费版让你体验全部功能,50次/天对大多数用户足够。Pro 适合重度用户。


支付方式

方式 适用 链接
微信支付 中国大陆 tokslash.stratsapien.com/pay
Creem 海外用户 Creem 支付链接

支付成功后,许可证密钥会显示在页面上,并发送到你的邮箱。


常见问题

安装后 Claude Code 看不到 TokSlash?

  1. 确认安装成功:tokslash --version
  2. 运行诊断:tokslash doctor(看哪里标红)
  3. 重新注册:tokslash install
  4. 在 Claude Code 输入 /mcp 查看是否有 tokslash

升级版本后工具失效?

pip install tokslash --upgrade
tokslash           # 会提示需要重启 Claude Code
# 重启 Claude Code

每个项目都要做什么?

cd 新项目/
tokslash init        # 写入 CLAUDE.md(只需一次)
tokslash reindex     # 建立索引
# 然后重启 Claude Code

数据会被上传吗?

不会。 所有索引、缓存、备份都保存在本地 .tokslash/ 目录。 唯一的网络请求是许可证激活验证(可离线使用)。


支持

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tokslash-0.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.4.0-cp314-cp314-macosx_11_0_arm64.whl (715.3 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

tokslash-0.4.0-cp313-cp313-win_amd64.whl (627.9 kB view details)

Uploaded CPython 3.13Windows x86-64

tokslash-0.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.4.0-cp313-cp313-macosx_11_0_arm64.whl (711.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tokslash-0.4.0-cp312-cp312-win_amd64.whl (635.6 kB view details)

Uploaded CPython 3.12Windows x86-64

tokslash-0.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.4.0-cp312-cp312-macosx_11_0_arm64.whl (717.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

tokslash-0.4.0-cp311-cp311-win_amd64.whl (644.9 kB view details)

Uploaded CPython 3.11Windows x86-64

tokslash-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (713.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tokslash-0.4.0-cp310-cp310-win_amd64.whl (643.2 kB view details)

Uploaded CPython 3.10Windows x86-64

tokslash-0.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

tokslash-0.4.0-cp310-cp310-macosx_11_0_arm64.whl (717.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file tokslash-0.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 160e4e689b522aa87f1a719065b9a3b6bef4c8805ea955631cbabd2c9bb9393c
MD5 b3ad39807a1478a099b3098ca71e45f8
BLAKE2b-256 094ff0dc52c16163cb11fff8fdd57aae9d455a5572c3656721ad590972b2e708

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c4512c0e2363ba76202721e5548325d31139a45bd67c8770c6acc79785fe943
MD5 e1d83b293a2d8de4e0325a63afecf70b
BLAKE2b-256 cc8a5240bb744c20c6a9af342c0953cabaa3a6fb3ce8a47be029c5755e9f3a49

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 627.9 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 68836c9ce2c46df4154efda5b412df8c299493835973cab93ff05c36c0973b4e
MD5 07fb05ded5631d85a50840da72351933
BLAKE2b-256 a3dc244f6967f47fcc1f338e6bc14a6b711ac483cf025df63bdf53461c23977c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d0b7de039672cbbac0dbebdbc56a9f93188972c9119635c6ed576f73f2af940
MD5 c34abdf5a16a09ec5e77921616f1d958
BLAKE2b-256 77224fae45092df904882d05af2dd6d0457521dea5f8fc3fcb52cbe5855517e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d27e509c0894074e3281c6dbfb3c9be77c0dd229416ac5488ed4a93fff73d1f6
MD5 df5a14ffbaadbac1f35cd69fa699a207
BLAKE2b-256 e187fb208a9d2403f3bf73fd2ec7a1a206f5d28df7564500525deac6b96dd366

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 635.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1a8d3c2a89ae225b936b5acca19ddee94a9a4bb257da5d021ad07061255ff994
MD5 fd308fcf722d14f8335fede984348406
BLAKE2b-256 48ef70203721e7e1deaf8bc1a9deffd0d3c8f55b52ba1663848fef2b99fcb4ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 279713a91feb136c52e0cea9822d8cfad240e669e4c6877742c82ef0ff435565
MD5 11e702af137f7fb075f632c729900f16
BLAKE2b-256 4dad6e2eab76b094b76bdd61d48ea6010a8b08bbd45f600eaa12b544e1a7688a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bce8edc7776892f17222f8854249a4a4a18fa7a1750f98b77d7d1f36d5c51941
MD5 6fc16da6225e6e1833e2500736a9673d
BLAKE2b-256 b4e33ea4c7011489aa63cdc44a03eb7041898e58e767b058dd979ac5d5a4eaa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 644.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 56a35658ef4d1f3deb41faf4a658ab81ece74466d7a258719e01a59b4e9c6d76
MD5 5bf09c0a48deb38695b46dff54f3d031
BLAKE2b-256 c13f70889e01c94b851461d86a8e8c639e3c05152054c6ae8b1e99158d76d95f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 36a9fa612f0487209dd66a6c0210a068e92937bc8e9105c57494501992ab6c93
MD5 101082f0d2e2a75946991c9d6b380330
BLAKE2b-256 546affba07a4ae8a3e3d41593e6e38f0201688eb1786bce46602de4e54efc53a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee2d9ce046cfcba44067013d8e8e02008b54d54e965270a8a5bb546c53dab44d
MD5 98158a95b26aad09fb40bf8f96bbd52e
BLAKE2b-256 b189a1a4bef186a633d0dc59495cf74d8bdb0862c717f23b2d751223362b1fb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: tokslash-0.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 643.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tokslash-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0bf6be08ee74170824a03a5a79c8af541e1e631a37b242b18c130044e84621cf
MD5 25a0966d80a1d5418de6c3f795dfda07
BLAKE2b-256 7dc6dd79a907913728c41ed24f2fa8df25206d8a4fcfaba9baa6cda725438f15

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 71b22d6d3d9a33f8ffbc34a3915eeff6c56ca8833c70f49fc50fb9c8678c9676
MD5 8f88950a0f6ed1c5866b9597ad7e67f9
BLAKE2b-256 f64601ecbbe2c6925e733b70ee618cb0dbadc63b2220815320814a656b088d92

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tokslash-0.4.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tokslash-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10304211a837af3408e44926b5d89173e36691b999f557952011f18b6694542e
MD5 dbb8e435aa8848abcdcc672c32b56016
BLAKE2b-256 d26ff50702304dd6eb1da0cbb62b95b1243784ebebe7a8af08f9d9c0610517c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tokslash-0.4.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on KickGit/tokslash_commercial

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page