@shareai-lab/kode 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +649 -25
- package/README.zh-CN.md +579 -0
- package/cli-acp.js +3 -17
- package/cli.js +5 -7
- package/dist/chunks/Doctor-M3J7GRTJ.js +12 -0
- package/dist/chunks/LogList-ISWZ6DDD.js +121 -0
- package/dist/chunks/LogList-ISWZ6DDD.js.map +7 -0
- package/dist/chunks/REPL-RQ6LO6S7.js +56 -0
- package/dist/chunks/ResumeConversation-6DMVBEGH.js +56 -0
- package/dist/chunks/agentLoader-FCRG3TFJ.js +31 -0
- package/dist/{agentsValidate-XP3CFN6F.js → chunks/agentsValidate-PEWMYN4Q.js} +97 -69
- package/dist/chunks/agentsValidate-PEWMYN4Q.js.map +7 -0
- package/dist/{ask-3G5H5KD5.js → chunks/ask-D7SOHJ6Z.js} +36 -44
- package/dist/chunks/ask-D7SOHJ6Z.js.map +7 -0
- package/dist/chunks/autoUpdater-CNESBOKO.js +19 -0
- package/dist/{chunk-EH34V7CY.js → chunks/chunk-2JN5MY67.js} +12 -14
- package/dist/chunks/chunk-2JN5MY67.js.map +7 -0
- package/dist/chunks/chunk-2QONJ5MG.js +14 -0
- package/dist/chunks/chunk-2QONJ5MG.js.map +7 -0
- package/dist/chunks/chunk-2WEXPKHH.js +903 -0
- package/dist/chunks/chunk-2WEXPKHH.js.map +7 -0
- package/dist/{chunk-K2MI4TPB.js → chunks/chunk-3BYE3ME6.js} +717 -792
- package/dist/chunks/chunk-3BYE3ME6.js.map +7 -0
- package/dist/chunks/chunk-3JDNWX7W.js +1264 -0
- package/dist/chunks/chunk-3JDNWX7W.js.map +7 -0
- package/dist/chunks/chunk-3OEJVB5A.js +906 -0
- package/dist/chunks/chunk-3OEJVB5A.js.map +7 -0
- package/dist/chunks/chunk-3TNIOEBO.js +369 -0
- package/dist/chunks/chunk-3TNIOEBO.js.map +7 -0
- package/dist/chunks/chunk-4A46ZXMJ.js +67 -0
- package/dist/chunks/chunk-4A46ZXMJ.js.map +7 -0
- package/dist/{chunk-4GAIJGRH.js → chunks/chunk-4ATBQOFO.js} +107 -55
- package/dist/chunks/chunk-4ATBQOFO.js.map +7 -0
- package/dist/chunks/chunk-4CRUCZR4.js +0 -0
- package/dist/{chunk-54DNHKOD.js → chunks/chunk-4EO6SIQY.js} +32 -75
- package/dist/chunks/chunk-4EO6SIQY.js.map +7 -0
- package/dist/chunks/chunk-53M46S5I.js +64 -0
- package/dist/chunks/chunk-53M46S5I.js.map +7 -0
- package/dist/{chunk-JC6NCUG5.js → chunks/chunk-54KOYG5C.js} +0 -2
- package/dist/{chunk-EZXMVTDU.js → chunks/chunk-6BAS4WY6.js} +29 -45
- package/dist/chunks/chunk-6BAS4WY6.js.map +7 -0
- package/dist/{chunk-BHGTA6JQ.js → chunks/chunk-6KRRFSDN.js} +4 -6
- package/dist/chunks/chunk-6KRRFSDN.js.map +7 -0
- package/dist/chunks/chunk-6LJNZK4K.js +39 -0
- package/dist/chunks/chunk-6LJNZK4K.js.map +7 -0
- package/dist/chunks/chunk-6ZWEOSEI.js +666 -0
- package/dist/chunks/chunk-6ZWEOSEI.js.map +7 -0
- package/dist/chunks/chunk-77XDJMBP.js +3326 -0
- package/dist/chunks/chunk-77XDJMBP.js.map +7 -0
- package/dist/chunks/chunk-7RRW4NTB.js +6454 -0
- package/dist/chunks/chunk-7RRW4NTB.js.map +7 -0
- package/dist/chunks/chunk-7X3TW4JB.js +4520 -0
- package/dist/chunks/chunk-7X3TW4JB.js.map +7 -0
- package/dist/chunks/chunk-B3MW3YGY.js +1409 -0
- package/dist/chunks/chunk-B3MW3YGY.js.map +7 -0
- package/dist/chunks/chunk-BBJFHTBC.js +28 -0
- package/dist/chunks/chunk-BBJFHTBC.js.map +7 -0
- package/dist/chunks/chunk-BHDHXOXB.js +24 -0
- package/dist/chunks/chunk-BHDHXOXB.js.map +7 -0
- package/dist/{chunk-OZNRLY3E.js → chunks/chunk-BTA7SZ26.js} +152 -223
- package/dist/chunks/chunk-BTA7SZ26.js.map +7 -0
- package/dist/chunks/chunk-CDGRYGPZ.js +103 -0
- package/dist/chunks/chunk-CDGRYGPZ.js.map +7 -0
- package/dist/{chunk-S6HRABTA.js → chunks/chunk-CP6E5UG6.js} +1 -4
- package/dist/chunks/chunk-CP6E5UG6.js.map +7 -0
- package/dist/{chunk-2PMO2FS2.js → chunks/chunk-DQ4JHXMT.js} +462 -424
- package/dist/chunks/chunk-DQ4JHXMT.js.map +7 -0
- package/dist/chunks/chunk-DXD76CMV.js +208 -0
- package/dist/chunks/chunk-DXD76CMV.js.map +7 -0
- package/dist/chunks/chunk-GCQCAXJZ.js +0 -0
- package/dist/chunks/chunk-GELCZWMB.js +42 -0
- package/dist/chunks/chunk-GELCZWMB.js.map +7 -0
- package/dist/{chunk-NQLEUHMS.js → chunks/chunk-HJYOH4HC.js} +23 -18
- package/dist/chunks/chunk-HJYOH4HC.js.map +7 -0
- package/dist/chunks/chunk-HPYNW6TT.js +744 -0
- package/dist/chunks/chunk-HPYNW6TT.js.map +7 -0
- package/dist/{chunk-2KWKUXLT.js → chunks/chunk-HRJ3ICQK.js} +59 -55
- package/dist/chunks/chunk-HRJ3ICQK.js.map +7 -0
- package/dist/{chunk-ZQU3TXLC.js → chunks/chunk-IFCIADS3.js} +571 -573
- package/dist/chunks/chunk-IFCIADS3.js.map +7 -0
- package/dist/chunks/chunk-IN7XZ7BC.js +27 -0
- package/dist/chunks/chunk-IN7XZ7BC.js.map +7 -0
- package/dist/chunks/chunk-L7P4M4KW.js +193 -0
- package/dist/chunks/chunk-L7P4M4KW.js.map +7 -0
- package/dist/chunks/chunk-LB6TCPDI.js +0 -0
- package/dist/{chunk-3RUXVV4S.js → chunks/chunk-LOCXPQNJ.js} +1 -4
- package/dist/{chunk-3RUXVV4S.js.map → chunks/chunk-LOCXPQNJ.js.map} +2 -2
- package/dist/{chunk-IE2CG2TV.js → chunks/chunk-LOD5ZHCI.js} +213 -208
- package/dist/chunks/chunk-LOD5ZHCI.js.map +7 -0
- package/dist/{chunk-S3J2TLV6.js → chunks/chunk-M7P3QNRU.js} +1 -4
- package/dist/{chunk-S3J2TLV6.js.map → chunks/chunk-M7P3QNRU.js.map} +2 -2
- package/dist/chunks/chunk-PPHLQVL7.js +4234 -0
- package/dist/chunks/chunk-PPHLQVL7.js.map +7 -0
- package/dist/{chunk-ABLVTESJ.js → chunks/chunk-QAXE37B5.js} +1 -4
- package/dist/chunks/chunk-QAXE37B5.js.map +7 -0
- package/dist/chunks/chunk-QHQOBUF6.js +60 -0
- package/dist/chunks/chunk-QHQOBUF6.js.map +7 -0
- package/dist/{chunk-SRZZFAS7.js → chunks/chunk-RPJXO7GG.js} +241 -214
- package/dist/chunks/chunk-RPJXO7GG.js.map +7 -0
- package/dist/{chunk-NPFOMITO.js → chunks/chunk-SWQV4KSY.js} +1 -4
- package/dist/{chunk-NPFOMITO.js.map → chunks/chunk-SWQV4KSY.js.map} +2 -2
- package/dist/chunks/chunk-SZLAPULP.js +28 -0
- package/dist/chunks/chunk-SZLAPULP.js.map +7 -0
- package/dist/{chunk-SDGKPKDK.js → chunks/chunk-T7RB5V5J.js} +23 -25
- package/dist/chunks/chunk-T7RB5V5J.js.map +7 -0
- package/dist/{chunk-HN4E4UUQ.js → chunks/chunk-TI2CTTMA.js} +25 -17
- package/dist/chunks/chunk-TI2CTTMA.js.map +7 -0
- package/dist/{chunk-G6I7XROM.js → chunks/chunk-TNGVRTO5.js} +45 -20
- package/dist/chunks/chunk-TNGVRTO5.js.map +7 -0
- package/dist/chunks/chunk-TNWB3U5Y.js +2077 -0
- package/dist/chunks/chunk-TNWB3U5Y.js.map +7 -0
- package/dist/chunks/chunk-U2IHWPCU.js +12 -0
- package/dist/chunks/chunk-U2IHWPCU.js.map +7 -0
- package/dist/{chunk-KAA5BGMQ.js → chunks/chunk-UNOY3VJ2.js} +1 -4
- package/dist/{chunk-KAA5BGMQ.js.map → chunks/chunk-UNOY3VJ2.js.map} +2 -2
- package/dist/{chunk-3TXNP6HH.js → chunks/chunk-UVDJL6ZZ.js} +97 -58
- package/dist/chunks/chunk-UVDJL6ZZ.js.map +7 -0
- package/dist/chunks/chunk-VNCW4C2Z.js +13452 -0
- package/dist/chunks/chunk-VNCW4C2Z.js.map +7 -0
- package/dist/chunks/chunk-W5EGGA44.js +15 -0
- package/dist/chunks/chunk-W5EGGA44.js.map +7 -0
- package/dist/chunks/chunk-XR2W3MAM.js +1533 -0
- package/dist/chunks/chunk-XR2W3MAM.js.map +7 -0
- package/dist/{chunk-QYFKRZQC.js → chunks/chunk-YIO5EBMQ.js} +423 -377
- package/dist/chunks/chunk-YIO5EBMQ.js.map +7 -0
- package/dist/chunks/chunk-ZBVLKZ5V.js +1062 -0
- package/dist/chunks/chunk-ZBVLKZ5V.js.map +7 -0
- package/dist/{chunk-E6YNABER.js → chunks/chunk-ZCLTZIVP.js} +1 -4
- package/dist/chunks/chunk-ZCLTZIVP.js.map +7 -0
- package/dist/chunks/client-SILZNM5N.js +42 -0
- package/dist/{config-6ZMBCL23.js → chunks/config-25HRTPSP.js} +48 -10
- package/dist/chunks/cost-tracker-Z2UZT2J5.js +28 -0
- package/dist/{customCommands-DNEJS3ZU.js → chunks/customCommands-TYMYZRG5.js} +11 -8
- package/dist/chunks/engine-MRVF6FK6.js +39 -0
- package/dist/{env-OFAXZ3XG.js → chunks/env-TJ5NOBEB.js} +7 -5
- package/dist/{kodeAgentSessionId-X6XWQW7B.js → chunks/kodeAgentSessionId-VTNISJ2L.js} +2 -4
- package/dist/chunks/kodeAgentSessionLoad-YB2RKBGJ.js +15 -0
- package/dist/chunks/kodeAgentSessionResume-DZSIVKVA.js +13 -0
- package/dist/chunks/kodeAgentStreamJson-X5PLS2S6.js +11 -0
- package/dist/{kodeAgentStreamJsonSession-GRWG3SPE.js → chunks/kodeAgentStreamJsonSession-RDXM4XYF.js} +38 -24
- package/dist/chunks/kodeAgentStreamJsonSession-RDXM4XYF.js.map +7 -0
- package/dist/{chunk-4RTX4AG4.js → chunks/kodeAgentStructuredStdio-SVGDSB4P.js} +14 -9
- package/dist/chunks/kodeAgentStructuredStdio-SVGDSB4P.js.map +7 -0
- package/dist/{kodeHooks-TDMXFWSO.js → chunks/kodeHooks-RVKYRJHG.js} +11 -9
- package/dist/{llm-XVXWYOHK.js → chunks/llm-62N6T5ZT.js} +1734 -1526
- package/dist/chunks/llm-62N6T5ZT.js.map +7 -0
- package/dist/chunks/llmLazy-ZUSSE3ZA.js +13 -0
- package/dist/{mentionProcessor-YD7YXYGF.js → chunks/mentionProcessor-RJW5UPJD.js} +46 -16
- package/dist/chunks/mentionProcessor-RJW5UPJD.js.map +7 -0
- package/dist/{messages-OFUJSPRV.js → chunks/messages-EEWWLPHN.js} +2 -6
- package/dist/chunks/model-5TIEKQPD.js +37 -0
- package/dist/{openai-5G5D5Q4B.js → chunks/openai-XXK3YZG4.js} +13 -10
- package/dist/{outputStyles-HLDXFQK3.js → chunks/outputStyles-FAJTXN2A.js} +6 -9
- package/dist/chunks/permissions-HO7INPWM.js +27 -0
- package/dist/{pluginRuntime-FPTKK6NY.js → chunks/pluginRuntime-C7K5ULK2.js} +31 -48
- package/dist/chunks/pluginRuntime-C7K5ULK2.js.map +7 -0
- package/dist/chunks/pluginValidation-DAM7WRTC.js +20 -0
- package/dist/chunks/registry-XYJXMOA5.js +60 -0
- package/dist/chunks/responsesStreaming-JNGE2P3D.js +8 -0
- package/dist/chunks/runNonTextPrintMode-SVBLCZQX.js +577 -0
- package/dist/chunks/runNonTextPrintMode-SVBLCZQX.js.map +7 -0
- package/dist/chunks/server-REXXF5IK.js +46 -0
- package/dist/{skillMarketplace-PSNKDINM.js → chunks/skillMarketplace-N4HVHNST.js} +8 -6
- package/dist/chunks/src-OROQIWP3.js +44 -0
- package/dist/chunks/src-QXLGGMUW.js +1647 -0
- package/dist/chunks/src-QXLGGMUW.js.map +7 -0
- package/dist/{cli-SRV2INSL.js → chunks/src-SSDT6MVP.js} +2659 -3384
- package/dist/chunks/src-SSDT6MVP.js.map +7 -0
- package/dist/chunks/theme-YBJUIMWK.js +10 -0
- package/dist/{toolPermissionContext-65L65VEZ.js → chunks/toolPermissionContext-MOCTRR7N.js} +2 -4
- package/dist/chunks/toolPermissionSettings-EV2EJAXL.js +18 -0
- package/dist/chunks/toolPermissionSettings-EV2EJAXL.js.map +7 -0
- package/dist/chunks/uuid-6577SO6X.js +7 -0
- package/dist/chunks/uuid-6577SO6X.js.map +7 -0
- package/dist/chunks/webOnlyMode-ALXX7UQY.js +66 -0
- package/dist/chunks/webOnlyMode-ALXX7UQY.js.map +7 -0
- package/dist/entrypoints/cli.js +10 -0
- package/dist/entrypoints/cli.js.map +7 -0
- package/dist/entrypoints/daemon.js +10 -0
- package/dist/entrypoints/daemon.js.map +7 -0
- package/dist/entrypoints/mcp.js +71 -0
- package/dist/entrypoints/mcp.js.map +7 -0
- package/dist/index.js +6 -7
- package/dist/index.js.map +3 -3
- package/dist/sdk/client.cjs +391 -0
- package/dist/sdk/client.cjs.map +7 -0
- package/dist/sdk/client.js +364 -0
- package/dist/sdk/client.js.map +7 -0
- package/dist/sdk/core.cjs +19932 -0
- package/dist/sdk/core.cjs.map +7 -0
- package/dist/sdk/core.js +19893 -0
- package/dist/sdk/core.js.map +7 -0
- package/dist/sdk/daemon-client.cjs +257 -0
- package/dist/sdk/daemon-client.cjs.map +7 -0
- package/dist/sdk/daemon-client.js +221 -0
- package/dist/sdk/daemon-client.js.map +7 -0
- package/dist/sdk/protocol.cjs +170 -0
- package/dist/sdk/protocol.cjs.map +7 -0
- package/dist/sdk/protocol.js +140 -0
- package/dist/sdk/protocol.js.map +7 -0
- package/dist/sdk/runtime-node.cjs +236 -0
- package/dist/sdk/runtime-node.cjs.map +7 -0
- package/dist/sdk/runtime-node.js +222 -0
- package/dist/sdk/runtime-node.js.map +7 -0
- package/dist/sdk/runtime.cjs +17 -0
- package/dist/sdk/runtime.cjs.map +7 -0
- package/dist/sdk/runtime.js +0 -0
- package/dist/sdk/runtime.js.map +7 -0
- package/dist/sdk/tools.cjs +30300 -0
- package/dist/sdk/tools.cjs.map +7 -0
- package/dist/sdk/tools.js +30282 -0
- package/dist/sdk/tools.js.map +7 -0
- package/dist/webui/assets/index-5hlfByVS.css +1 -0
- package/dist/webui/assets/index-BR9lm1lA.js +82 -0
- package/dist/webui/index.html +28 -0
- package/package.json +93 -22
- package/scripts/binary-utils.cjs +12 -4
- package/scripts/cli-acp-wrapper.cjs +3 -17
- package/scripts/cli-wrapper.cjs +5 -7
- package/scripts/postinstall.js +8 -4
- package/dist/REPL-GIU4ZIXM.js +0 -42
- package/dist/acp-H3VJ77YG.js +0 -1357
- package/dist/acp-H3VJ77YG.js.map +0 -7
- package/dist/agentsValidate-XP3CFN6F.js.map +0 -7
- package/dist/ask-3G5H5KD5.js.map +0 -7
- package/dist/autoUpdater-DNRMJWFQ.js +0 -17
- package/dist/chunk-2KWKUXLT.js.map +0 -7
- package/dist/chunk-2PMO2FS2.js.map +0 -7
- package/dist/chunk-3TXNP6HH.js.map +0 -7
- package/dist/chunk-4GAIJGRH.js.map +0 -7
- package/dist/chunk-4RTX4AG4.js.map +0 -7
- package/dist/chunk-54DNHKOD.js.map +0 -7
- package/dist/chunk-67PY5IX6.js +0 -34
- package/dist/chunk-67PY5IX6.js.map +0 -7
- package/dist/chunk-6DRDLOLP.js +0 -2613
- package/dist/chunk-6DRDLOLP.js.map +0 -7
- package/dist/chunk-7CQVZNQV.js +0 -1609
- package/dist/chunk-7CQVZNQV.js.map +0 -7
- package/dist/chunk-ABLVTESJ.js.map +0 -7
- package/dist/chunk-AIMIPK4B.js +0 -835
- package/dist/chunk-AIMIPK4B.js.map +0 -7
- package/dist/chunk-BHGTA6JQ.js.map +0 -7
- package/dist/chunk-CIG63V4E.js +0 -72
- package/dist/chunk-CIG63V4E.js.map +0 -7
- package/dist/chunk-E6YNABER.js.map +0 -7
- package/dist/chunk-EH34V7CY.js.map +0 -7
- package/dist/chunk-EZXMVTDU.js.map +0 -7
- package/dist/chunk-FH5CHM6L.js +0 -148
- package/dist/chunk-FH5CHM6L.js.map +0 -7
- package/dist/chunk-G6I7XROM.js.map +0 -7
- package/dist/chunk-HN4E4UUQ.js.map +0 -7
- package/dist/chunk-HSPVVDIW.js +0 -30198
- package/dist/chunk-HSPVVDIW.js.map +0 -7
- package/dist/chunk-IE2CG2TV.js.map +0 -7
- package/dist/chunk-K2MI4TPB.js.map +0 -7
- package/dist/chunk-MN77D2F7.js +0 -2931
- package/dist/chunk-MN77D2F7.js.map +0 -7
- package/dist/chunk-NQLEUHMS.js.map +0 -7
- package/dist/chunk-OIFQB3S4.js +0 -515
- package/dist/chunk-OIFQB3S4.js.map +0 -7
- package/dist/chunk-OWTG2W3A.js +0 -164
- package/dist/chunk-OWTG2W3A.js.map +0 -7
- package/dist/chunk-OZNRLY3E.js.map +0 -7
- package/dist/chunk-QYFKRZQC.js.map +0 -7
- package/dist/chunk-S6HRABTA.js.map +0 -7
- package/dist/chunk-SDGKPKDK.js.map +0 -7
- package/dist/chunk-SRZZFAS7.js.map +0 -7
- package/dist/chunk-UKHTVRJM.js +0 -47
- package/dist/chunk-UKHTVRJM.js.map +0 -7
- package/dist/chunk-UYXEDKOZ.js +0 -24
- package/dist/chunk-UYXEDKOZ.js.map +0 -7
- package/dist/chunk-VBXVYQYY.js +0 -145
- package/dist/chunk-VBXVYQYY.js.map +0 -7
- package/dist/chunk-WVHORZQ5.js +0 -17
- package/dist/chunk-WVHORZQ5.js.map +0 -7
- package/dist/chunk-WWUWDNWW.js +0 -49
- package/dist/chunk-WWUWDNWW.js.map +0 -7
- package/dist/chunk-Z33T5YN5.js +0 -654
- package/dist/chunk-Z33T5YN5.js.map +0 -7
- package/dist/chunk-ZQU3TXLC.js.map +0 -7
- package/dist/cli-SRV2INSL.js.map +0 -7
- package/dist/commands-TWH6PGVG.js +0 -46
- package/dist/context-JQIOOI4W.js +0 -30
- package/dist/costTracker-6SL26FDB.js +0 -19
- package/dist/kodeAgentSessionLoad-6N27AC5K.js +0 -18
- package/dist/kodeAgentSessionResume-HUSAEO24.js +0 -16
- package/dist/kodeAgentStreamJson-NXFN7TXH.js +0 -13
- package/dist/kodeAgentStreamJsonSession-GRWG3SPE.js.map +0 -7
- package/dist/kodeAgentStructuredStdio-HGWJT7CU.js +0 -10
- package/dist/llm-XVXWYOHK.js.map +0 -7
- package/dist/llmLazy-7TD5N7XP.js +0 -15
- package/dist/loader-AUXIJTY6.js +0 -28
- package/dist/mcp-BXJ3K7NZ.js +0 -49
- package/dist/mentionProcessor-YD7YXYGF.js.map +0 -7
- package/dist/model-KPYCXWBK.js +0 -30
- package/dist/pluginRuntime-FPTKK6NY.js.map +0 -7
- package/dist/pluginValidation-DSFXZ4GF.js +0 -17
- package/dist/prompts-LWLAJRS2.js +0 -48
- package/dist/query-HVPWL27C.js +0 -50
- package/dist/responsesStreaming-AW344PQO.js +0 -10
- package/dist/ripgrep-YOPCY2GO.js +0 -17
- package/dist/state-KNRWP3FO.js +0 -16
- package/dist/theme-7S2QN2FO.js +0 -14
- package/dist/toolPermissionSettings-GPOBH4IV.js +0 -18
- package/dist/tools-FZU2FZBD.js +0 -47
- package/dist/userInput-VHNBN2MW.js +0 -311
- package/dist/userInput-VHNBN2MW.js.map +0 -7
- package/dist/uuid-QN2CNKKN.js +0 -9
- /package/dist/{REPL-GIU4ZIXM.js.map → chunks/Doctor-M3J7GRTJ.js.map} +0 -0
- /package/dist/{autoUpdater-DNRMJWFQ.js.map → chunks/REPL-RQ6LO6S7.js.map} +0 -0
- /package/dist/{chunk-JC6NCUG5.js.map → chunks/ResumeConversation-6DMVBEGH.js.map} +0 -0
- /package/dist/{commands-TWH6PGVG.js.map → chunks/agentLoader-FCRG3TFJ.js.map} +0 -0
- /package/dist/{config-6ZMBCL23.js.map → chunks/autoUpdater-CNESBOKO.js.map} +0 -0
- /package/dist/{context-JQIOOI4W.js.map → chunks/chunk-4CRUCZR4.js.map} +0 -0
- /package/dist/{costTracker-6SL26FDB.js.map → chunks/chunk-54KOYG5C.js.map} +0 -0
- /package/dist/{customCommands-DNEJS3ZU.js.map → chunks/chunk-GCQCAXJZ.js.map} +0 -0
- /package/dist/{env-OFAXZ3XG.js.map → chunks/chunk-LB6TCPDI.js.map} +0 -0
- /package/dist/{kodeAgentSessionId-X6XWQW7B.js.map → chunks/client-SILZNM5N.js.map} +0 -0
- /package/dist/{kodeAgentSessionLoad-6N27AC5K.js.map → chunks/config-25HRTPSP.js.map} +0 -0
- /package/dist/{kodeAgentSessionResume-HUSAEO24.js.map → chunks/cost-tracker-Z2UZT2J5.js.map} +0 -0
- /package/dist/{kodeAgentStreamJson-NXFN7TXH.js.map → chunks/customCommands-TYMYZRG5.js.map} +0 -0
- /package/dist/{kodeAgentStructuredStdio-HGWJT7CU.js.map → chunks/engine-MRVF6FK6.js.map} +0 -0
- /package/dist/{kodeHooks-TDMXFWSO.js.map → chunks/env-TJ5NOBEB.js.map} +0 -0
- /package/dist/{llmLazy-7TD5N7XP.js.map → chunks/kodeAgentSessionId-VTNISJ2L.js.map} +0 -0
- /package/dist/{loader-AUXIJTY6.js.map → chunks/kodeAgentSessionLoad-YB2RKBGJ.js.map} +0 -0
- /package/dist/{mcp-BXJ3K7NZ.js.map → chunks/kodeAgentSessionResume-DZSIVKVA.js.map} +0 -0
- /package/dist/{messages-OFUJSPRV.js.map → chunks/kodeAgentStreamJson-X5PLS2S6.js.map} +0 -0
- /package/dist/{model-KPYCXWBK.js.map → chunks/kodeHooks-RVKYRJHG.js.map} +0 -0
- /package/dist/{openai-5G5D5Q4B.js.map → chunks/llmLazy-ZUSSE3ZA.js.map} +0 -0
- /package/dist/{outputStyles-HLDXFQK3.js.map → chunks/messages-EEWWLPHN.js.map} +0 -0
- /package/dist/{pluginValidation-DSFXZ4GF.js.map → chunks/model-5TIEKQPD.js.map} +0 -0
- /package/dist/{prompts-LWLAJRS2.js.map → chunks/openai-XXK3YZG4.js.map} +0 -0
- /package/dist/{query-HVPWL27C.js.map → chunks/outputStyles-FAJTXN2A.js.map} +0 -0
- /package/dist/{responsesStreaming-AW344PQO.js.map → chunks/permissions-HO7INPWM.js.map} +0 -0
- /package/dist/{ripgrep-YOPCY2GO.js.map → chunks/pluginValidation-DAM7WRTC.js.map} +0 -0
- /package/dist/{skillMarketplace-PSNKDINM.js.map → chunks/registry-XYJXMOA5.js.map} +0 -0
- /package/dist/{state-KNRWP3FO.js.map → chunks/responsesStreaming-JNGE2P3D.js.map} +0 -0
- /package/dist/{theme-7S2QN2FO.js.map → chunks/server-REXXF5IK.js.map} +0 -0
- /package/dist/{toolPermissionContext-65L65VEZ.js.map → chunks/skillMarketplace-N4HVHNST.js.map} +0 -0
- /package/dist/{toolPermissionSettings-GPOBH4IV.js.map → chunks/src-OROQIWP3.js.map} +0 -0
- /package/dist/{tools-FZU2FZBD.js.map → chunks/theme-YBJUIMWK.js.map} +0 -0
- /package/dist/{uuid-QN2CNKKN.js.map → chunks/toolPermissionContext-MOCTRR7N.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,47 +1,671 @@
|
|
|
1
|
-
# Kode
|
|
1
|
+
# Kode - AI Coding
|
|
2
|
+
<img width="991" height="479" alt="image" src="https://github.com/user-attachments/assets/c1751e92-94dc-4e4a-9558-8cd2d058c1a1" /> <br>
|
|
3
|
+
[](https://www.npmjs.com/package/@shareai-lab/kode)
|
|
4
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
|
+
[](https://agents.md)
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
[中文文档](README.zh-CN.md) | [Contributing](CONTRIBUTING.md) | [Documentation](docs/README.md)
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
<img width="90%" alt="image" src="https://github.com/user-attachments/assets/fdce7017-8095-429d-b74e-07f43a6919e1" />
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
<img width="90%" alt="2c0ad8540f2872d197c7b17ae23d74f5" src="https://github.com/user-attachments/assets/f220cc27-084d-468e-a3f4-d5bc44d84fac" />
|
|
12
|
+
|
|
13
|
+
<img width="90%" alt="f266d316d90ddd0db5a3d640c1126930" src="https://github.com/user-attachments/assets/90ec7399-1349-4607-b689-96613b3dc3e2" />
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<img width="90%" alt="image" src="https://github.com/user-attachments/assets/b30696ce-5ab1-40a0-b741-c7ef3945dba0" />
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 📢 Update Log
|
|
20
|
+
|
|
21
|
+
**2025-12-22**: Native-first distribution (Windows OOTB). Kode prefers a cached native binary and falls back to the Node.js runtime when needed. See `docs/binary-distribution.md`.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## 🤝 AGENTS.md Standard Support
|
|
25
|
+
|
|
26
|
+
Kode supports the [AGENTS.md standard](https://agents.md): a simple, open format for guiding coding agents, used by 60k+ open-source projects.
|
|
27
|
+
|
|
28
|
+
### Full Compatibility with Multiple Standards
|
|
29
|
+
|
|
30
|
+
- ✅ **AGENTS.md** - Native support for the OpenAI-initiated standard format
|
|
31
|
+
- ✅ **Legacy `.claude` compatibility** - Reads `.claude` directories and `CLAUDE.md` when present (see `docs/compatibility.md`)
|
|
32
|
+
- ✅ **Subagent System** - Advanced agent delegation and task orchestration
|
|
33
|
+
- ✅ **Cross-platform** - Works with 20+ AI models and providers
|
|
34
|
+
|
|
35
|
+
Use `# Your documentation request` to generate and maintain your AGENTS.md file automatically, while preserving compatibility with existing `.claude` workflows.
|
|
36
|
+
|
|
37
|
+
### Instruction Discovery (Codex-compatible)
|
|
38
|
+
|
|
39
|
+
- Kode reads project instructions by walking from the Git repo root → current working directory.
|
|
40
|
+
- In each directory, it prefers `AGENTS.override.md` over `AGENTS.md` (at most one file per directory).
|
|
41
|
+
- Discovered files are concatenated root → leaf (combined size capped at 32 KiB by default; override with `KODE_PROJECT_DOC_MAX_BYTES`).
|
|
42
|
+
- If `CLAUDE.md` exists in the current directory, Kode also reads it as a legacy instruction file.
|
|
43
|
+
|
|
44
|
+
## Overview
|
|
45
|
+
|
|
46
|
+
Kode is a powerful AI assistant that lives in your terminal. It can understand your codebase, edit files, run commands, and handle entire workflows for you.
|
|
47
|
+
|
|
48
|
+
> **⚠️ Security Notice**: Kode runs in YOLO mode by default (equivalent to the `--dangerously-skip-permissions` flag), bypassing all permission checks for maximum productivity. YOLO mode is recommended only for trusted, secure environments when working on non-critical projects. If you're working with important files or using models of questionable capability, we strongly recommend using `kode --safe` to enable permission checks and manual approval for all operations.
|
|
49
|
+
>
|
|
50
|
+
> **📊 Model Performance**: For optimal performance, we recommend using newer, more capable models designed for autonomous task completion. Avoid older Q&A-focused models like GPT-4o or Gemini 2.5 Pro, which are optimized for answering questions rather than sustained independent task execution. Choose models specifically trained for agentic workflows and extended reasoning capabilities.
|
|
51
|
+
|
|
52
|
+
## Network & Privacy
|
|
53
|
+
|
|
54
|
+
- Kode does not send product telemetry/analytics by default.
|
|
55
|
+
- Network requests happen only when you explicitly use networked features:
|
|
56
|
+
- Model provider requests (Anthropic/OpenAI-compatible endpoints you configure)
|
|
57
|
+
- Web tools (`WebFetch`, `WebSearch`)
|
|
58
|
+
- Plugin marketplace downloads (GitHub/URL sources) and OAuth flows (when used)
|
|
59
|
+
- Optional update checks (opt-in via `autoUpdaterStatus: enabled`)
|
|
60
|
+
|
|
61
|
+
<img width="600" height="577" alt="image" src="https://github.com/user-attachments/assets/8b46a39d-1ab6-4669-9391-14ccc6c5234c" />
|
|
62
|
+
|
|
63
|
+
## Features
|
|
64
|
+
|
|
65
|
+
### Core Capabilities
|
|
66
|
+
- 🤖 **AI-Powered Assistance** - Uses advanced AI models to understand and respond to your requests
|
|
67
|
+
- 🔄 **Multi-Model Collaboration** - Flexibly switch and combine multiple AI models to leverage their unique strengths
|
|
68
|
+
- 🦜 **Expert Model Consultation** - Use `@ask-model-name` to consult specific AI models for specialized analysis
|
|
69
|
+
- 👤 **Intelligent Agent System** - Use `@run-agent-name` to delegate tasks to specialized subagents
|
|
70
|
+
- 📝 **Code Editing** - Directly edit files with intelligent suggestions and improvements
|
|
71
|
+
- 🔍 **Codebase Understanding** - Analyzes your project structure and code relationships
|
|
72
|
+
- 🚀 **Command Execution** - Run shell commands and see results in real-time
|
|
73
|
+
- 🛠️ **Workflow Automation** - Handle complex development tasks with simple prompts
|
|
74
|
+
|
|
75
|
+
### Authoring Comfort
|
|
76
|
+
- `Option+G` (Alt+G) opens your message in your preferred editor (respects `$EDITOR`/`$VISUAL`; falls back to code/nano/vim/notepad) and returns the text to the prompt when you close it.
|
|
77
|
+
- `Option+Enter` inserts a newline inside the prompt without sending; plain Enter submits. `Option+M` cycles the active model.
|
|
78
|
+
|
|
79
|
+
### 🎯 Advanced Intelligent Completion System
|
|
80
|
+
Our state-of-the-art completion system provides unparalleled coding assistance:
|
|
81
|
+
|
|
82
|
+
#### Smart Fuzzy Matching
|
|
83
|
+
- **Hyphen-Aware Matching** - Type `dao` to match `run-agent-dao-qi-harmony-designer`
|
|
84
|
+
- **Abbreviation Support** - `dq` matches `dao-qi`, `nde` matches `node`
|
|
85
|
+
- **Numeric Suffix Handling** - `py3` intelligently matches `python3`
|
|
86
|
+
- **Multi-Algorithm Fusion** - Combines 7+ matching algorithms for best results
|
|
87
|
+
|
|
88
|
+
#### Intelligent Context Detection
|
|
89
|
+
- **No @ Required** - Type `gp5` directly to match `@ask-gpt-5`
|
|
90
|
+
- **Auto-Prefix Addition** - Tab/Enter automatically adds `@` for agents and models
|
|
91
|
+
- **Mixed Completion** - Seamlessly switch between commands, files, agents, and models
|
|
92
|
+
- **Smart Prioritization** - Results ranked by relevance and usage frequency
|
|
93
|
+
|
|
94
|
+
#### Unix Command Optimization
|
|
95
|
+
- **500+ Common Commands** - Curated database of frequently used Unix/Linux commands
|
|
96
|
+
- **System Intersection** - Only shows commands that actually exist on your system
|
|
97
|
+
- **Priority Scoring** - Common commands appear first (git, npm, docker, etc.)
|
|
98
|
+
- **Real-time Loading** - Dynamic command discovery from system PATH
|
|
99
|
+
|
|
100
|
+
### User Experience
|
|
101
|
+
- 🎨 **Interactive UI** - Beautiful terminal interface with syntax highlighting
|
|
102
|
+
- 🔌 **Tool System** - Extensible architecture with specialized tools for different tasks
|
|
103
|
+
- 💾 **Context Management** - Smart context handling to maintain conversation continuity
|
|
104
|
+
- 📋 **AGENTS.md Integration** - Use `# documentation requests` to auto-generate and maintain project documentation
|
|
105
|
+
|
|
106
|
+
## Installation
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm install -g @shareai-lab/kode
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Dev channel (latest features):
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm install -g @shareai-lab/kode@dev
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
After installation, you can use any of these commands:
|
|
119
|
+
- `kode` - Primary command
|
|
120
|
+
- `kwa` - Kode With Agent (alternative)
|
|
121
|
+
- `kd` - Ultra-short alias
|
|
122
|
+
|
|
123
|
+
### Native binaries (Windows OOTB)
|
|
124
|
+
|
|
125
|
+
- No WSL/Git Bash required.
|
|
126
|
+
- On `postinstall`, Kode will best-effort download a native binary from GitHub Releases into `${KODE_BIN_DIR:-~/.kode/bin}/<version>/<platform>-<arch>/kode(.exe)`.
|
|
127
|
+
- The wrapper (`cli.js`) prefers the native binary and falls back to the Node.js runtime (`node dist/index.js`) when needed.
|
|
128
|
+
|
|
129
|
+
Overrides:
|
|
130
|
+
- Mirror downloads: `KODE_BINARY_BASE_URL`
|
|
131
|
+
- Disable download: `KODE_SKIP_BINARY_DOWNLOAD=1`
|
|
132
|
+
- Cache directory: `KODE_BIN_DIR`
|
|
133
|
+
|
|
134
|
+
See `docs/binary-distribution.md`.
|
|
135
|
+
|
|
136
|
+
### Configuration / API keys
|
|
137
|
+
|
|
138
|
+
- Global config (models, pointers, theme, etc): `~/.kode.json` (or `<KODE_CONFIG_DIR>/config.json` when `KODE_CONFIG_DIR`/`CLAUDE_CONFIG_DIR` is set).
|
|
139
|
+
- Project/local settings (output style, etc): `./.kode/settings.json` and `./.kode/settings.local.json` (legacy `.claude` is supported for some features).
|
|
140
|
+
- Configure models via `/model` (UI) or `kode models import/export` (YAML). Details: `docs/develop/configuration.md`.
|
|
141
|
+
|
|
142
|
+
## Usage
|
|
143
|
+
|
|
144
|
+
### Interactive Mode
|
|
145
|
+
Start an interactive session:
|
|
146
|
+
```bash
|
|
147
|
+
kode
|
|
148
|
+
# or
|
|
149
|
+
kwa
|
|
150
|
+
# or
|
|
151
|
+
kd
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Non-Interactive Mode
|
|
155
|
+
Get a quick response:
|
|
156
|
+
```bash
|
|
157
|
+
kode -p "explain this function" path/to/file.js
|
|
158
|
+
# or
|
|
159
|
+
kwa -p "explain this function" path/to/file.js
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### ACP (Agent Client Protocol)
|
|
163
|
+
|
|
164
|
+
Run Kode as an ACP agent server (stdio JSON-RPC), for clients like Toad/Zed:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
kode-acp
|
|
168
|
+
# or
|
|
169
|
+
kode --acp
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Toad example:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
toad acp "kode-acp"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
More: `docs/acp.md`.
|
|
179
|
+
|
|
180
|
+
### Using the @ Mention System
|
|
181
|
+
|
|
182
|
+
Kode supports a powerful @ mention system for intelligent completions:
|
|
183
|
+
|
|
184
|
+
#### 🦜 Expert Model Consultation
|
|
185
|
+
```bash
|
|
186
|
+
# Consult specific AI models for expert opinions
|
|
187
|
+
@ask-claude-sonnet-4 How should I optimize this React component for performance?
|
|
188
|
+
@ask-gpt-5 What are the security implications of this authentication method?
|
|
189
|
+
@ask-o1-preview Analyze the complexity of this algorithm
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### 👤 Specialized Agent Delegation
|
|
193
|
+
```bash
|
|
194
|
+
# Delegate tasks to specialized subagents
|
|
195
|
+
@run-agent-simplicity-auditor Review this code for over-engineering
|
|
196
|
+
@run-agent-architect Design a microservices architecture for this system
|
|
197
|
+
@run-agent-test-writer Create comprehensive tests for these modules
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### 📁 Smart File References
|
|
201
|
+
```bash
|
|
202
|
+
# Reference files and directories with auto-completion
|
|
203
|
+
@packages/core/src/query/index.ts
|
|
204
|
+
@docs/README.md
|
|
205
|
+
@.env.example
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
The @ mention system provides intelligent completions as you type, showing available models, agents, and files.
|
|
209
|
+
|
|
210
|
+
### MCP Servers (Extensions)
|
|
211
|
+
|
|
212
|
+
Kode can connect to MCP servers to extend tools and context.
|
|
213
|
+
|
|
214
|
+
- Config files: `.mcp.json` (recommended) or `.mcprc` in your project root. See `docs/mcp.md`.
|
|
215
|
+
- CLI:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
kode mcp add
|
|
219
|
+
kode mcp list
|
|
220
|
+
kode mcp get <name>
|
|
221
|
+
kode mcp remove <name>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Example `.mcprc`:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"my-sse-server": { "type": "sse", "url": "http://127.0.0.1:3333/sse" }
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Permissions & Approvals
|
|
233
|
+
|
|
234
|
+
- Default mode skips most prompts for speed.
|
|
235
|
+
- Safe mode: `kode --safe` requires approval for Bash commands and file writes/edits.
|
|
236
|
+
- Plan mode: the assistant may ask to enter plan mode to draft a plan file; while in plan mode, only read-only/planning tools (and the plan file) are allowed until you approve exiting plan mode.
|
|
237
|
+
|
|
238
|
+
### Paste & Images
|
|
239
|
+
|
|
240
|
+
- Multi-line/large paste is inserted as a placeholder and expanded on submit.
|
|
241
|
+
- Pasting multiple existing file paths inserts `@path` mentions automatically (quoted when needed).
|
|
242
|
+
- Image paste (macOS): press `Ctrl+V` to attach clipboard images; you can paste multiple images before sending.
|
|
243
|
+
|
|
244
|
+
### System Sandbox (Linux)
|
|
245
|
+
|
|
246
|
+
- In safe mode (or with `KODE_SYSTEM_SANDBOX=1`), agent-triggered Bash tool calls try to run inside a `bwrap` sandbox when available.
|
|
247
|
+
- Network is disabled by default; set `KODE_SYSTEM_SANDBOX_NETWORK=inherit` to allow network.
|
|
248
|
+
- Set `KODE_SYSTEM_SANDBOX=required` to fail closed if sandbox cannot be started.
|
|
249
|
+
- See `docs/system-sandbox.md` for details and platform notes.
|
|
250
|
+
|
|
251
|
+
### Troubleshooting
|
|
252
|
+
|
|
253
|
+
- Models: use `/model`, or `kode models import kode-models.yaml`, and ensure required API key env vars exist.
|
|
254
|
+
- Windows: if the native binary download is blocked/offline, set `KODE_BINARY_BASE_URL` (mirror) or `KODE_SKIP_BINARY_DOWNLOAD=1` (skip download); the wrapper will fall back to the Node.js runtime (`dist/index.js`).
|
|
255
|
+
- MCP: use `kode mcp list` to check server status; tune `MCP_CONNECTION_TIMEOUT_MS`, `MCP_SERVER_CONNECTION_BATCH_SIZE`, and `MCP_TOOL_TIMEOUT` if servers are slow.
|
|
256
|
+
- Sandbox: install `bwrap` (bubblewrap) on Linux, or set `KODE_SYSTEM_SANDBOX=0` to disable.
|
|
257
|
+
|
|
258
|
+
### AGENTS.md Documentation Mode
|
|
259
|
+
|
|
260
|
+
Use the `#` prefix to generate and maintain your AGENTS.md documentation:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Generate setup instructions
|
|
264
|
+
# How do I set up the development environment?
|
|
265
|
+
|
|
266
|
+
# Create testing documentation
|
|
267
|
+
# What are the testing procedures for this project?
|
|
268
|
+
|
|
269
|
+
# Document deployment process
|
|
270
|
+
# Explain the deployment pipeline and requirements
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
This mode automatically formats responses as structured documentation and appends them to your AGENTS.md file.
|
|
274
|
+
|
|
275
|
+
### Docker Usage
|
|
276
|
+
|
|
277
|
+
#### Alternative: Build from local source
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Clone the repository
|
|
281
|
+
git clone https://github.com/shareAI-lab/Kode.git
|
|
282
|
+
cd Kode
|
|
283
|
+
|
|
284
|
+
# Build the image locally
|
|
285
|
+
docker build --no-cache -t kode .
|
|
286
|
+
|
|
287
|
+
# Run in your project directory
|
|
288
|
+
cd your-project
|
|
289
|
+
docker run -it --rm \
|
|
290
|
+
-v $(pwd):/workspace \
|
|
291
|
+
-v ~/.kode:/root/.kode \
|
|
292
|
+
-v ~/.kode.json:/root/.kode.json \
|
|
293
|
+
-w /workspace \
|
|
294
|
+
kode
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
#### Docker Configuration Details
|
|
298
|
+
|
|
299
|
+
The Docker setup includes:
|
|
300
|
+
|
|
301
|
+
- **Volume Mounts**:
|
|
302
|
+
- `$(pwd):/workspace` - Mounts your current project directory
|
|
303
|
+
- `~/.kode:/root/.kode` - Preserves your kode configuration directory between runs
|
|
304
|
+
- `~/.kode.json:/root/.kode.json` - Preserves your kode global configuration file between runs
|
|
305
|
+
|
|
306
|
+
- **Working Directory**: Set to `/workspace` inside the container
|
|
307
|
+
|
|
308
|
+
- **Interactive Mode**: Uses `-it` flags for interactive terminal access
|
|
309
|
+
|
|
310
|
+
- **Cleanup**: `--rm` flag removes the container after exit
|
|
311
|
+
|
|
312
|
+
**Note**: Kode uses both `~/.kode` directory for additional data (like memory files) and `~/.kode.json` file for global configuration.
|
|
313
|
+
|
|
314
|
+
The first time you run the Docker command, it will build the image. Subsequent runs will use the cached image for faster startup.
|
|
315
|
+
|
|
316
|
+
You can use the onboarding to set up the model, or `/model`.
|
|
317
|
+
If you don't see the models you want on the list, you can manually set them in `/config`
|
|
318
|
+
As long as you have an openai-like endpoint, it should work.
|
|
319
|
+
|
|
320
|
+
### Commands
|
|
321
|
+
|
|
322
|
+
- `/help` - Show available commands
|
|
323
|
+
- `/model` - Change AI model settings
|
|
324
|
+
- `/config` - Open configuration panel
|
|
325
|
+
- `/agents` - Manage subagents
|
|
326
|
+
- `/output-style` - Set the output style
|
|
327
|
+
- `/statusline` - Configure a custom status line command
|
|
328
|
+
- `/cost` - Show token usage and costs
|
|
329
|
+
- `/clear` - Clear conversation history
|
|
330
|
+
- `/init` - Initialize project context
|
|
331
|
+
- `/plugin` - Manage plugins/marketplaces (skills, commands)
|
|
332
|
+
|
|
333
|
+
## Agents / Subagents
|
|
334
|
+
|
|
335
|
+
Kode supports subagents (agent templates) for delegation and task orchestration.
|
|
336
|
+
|
|
337
|
+
- Agents are loaded from `.kode/agents` and `.claude/agents` (user + project), plus plugins/policy and `--agents`.
|
|
338
|
+
- Manage in the UI: `/agents` (creates new agents under `./.claude/agents` / `~/.claude/agents` by default).
|
|
339
|
+
- Run via mentions: `@run-agent-<agentType> ...`
|
|
340
|
+
- Run via tooling: `Task(subagent_type: "<agentType>", ...)`
|
|
341
|
+
- CLI flags: `--agents <json>` (inject agents for this run), `--setting-sources user,project,local` (control which sources are loaded)
|
|
342
|
+
|
|
343
|
+
Minimal agent file example (`./.kode/agents/reviewer.md`):
|
|
344
|
+
|
|
345
|
+
```md
|
|
346
|
+
---
|
|
347
|
+
name: reviewer
|
|
348
|
+
description: "Review diffs for correctness, security, and simplicity"
|
|
349
|
+
tools: ["Read", "Grep"]
|
|
350
|
+
model: inherit
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
Be strict. Point out bugs and risky changes. Prefer small, targeted fixes.
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Model field notes:
|
|
357
|
+
- Compatibility aliases: `inherit`, `opus`, `sonnet`, `haiku` (mapped to model pointers)
|
|
358
|
+
- Kode selectors (via `/model`): pointers (`main|task|compact|quick`), profile name, modelName, or `provider:modelName` (e.g. `openai:o3`)
|
|
359
|
+
|
|
360
|
+
Validate agent templates:
|
|
8
361
|
|
|
9
362
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
363
|
+
kode agents validate
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
See `docs/agents-system.md`.
|
|
367
|
+
|
|
368
|
+
## Skills & Plugins
|
|
369
|
+
|
|
370
|
+
Kode supports:
|
|
371
|
+
- **Agent Skills** format (`SKILL.md`) for reusable skill packs
|
|
372
|
+
- **Marketplace compatibility** (`.kode-plugin/marketplace.json`, legacy `.claude-plugin/marketplace.json`) for sharing/installing skill packs
|
|
373
|
+
|
|
374
|
+
### Install skills from a marketplace
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
# Add a marketplace (local path, GitHub owner/repo, or URL)
|
|
378
|
+
kode plugin marketplace add ./path/to/marketplace-repo
|
|
379
|
+
kode plugin marketplace add owner/repo
|
|
380
|
+
kode plugin marketplace list
|
|
381
|
+
|
|
382
|
+
# Install a plugin pack (installs skills/commands)
|
|
383
|
+
kode plugin install document-skills@anthropic-agent-skills --scope user
|
|
384
|
+
|
|
385
|
+
# Project-scoped install (writes to ./.kode/...)
|
|
386
|
+
kode plugin install document-skills@anthropic-agent-skills --scope project
|
|
387
|
+
|
|
388
|
+
# Disable/enable an installed plugin
|
|
389
|
+
kode plugin disable document-skills@anthropic-agent-skills --scope user
|
|
390
|
+
kode plugin enable document-skills@anthropic-agent-skills --scope user
|
|
12
391
|
```
|
|
13
392
|
|
|
14
|
-
|
|
15
|
-
- Postinstall will try to download a standalone binary to `~/.kode/bin/<version>/<platform>-<arch>/` for faster startup, but npm users can run purely on Node.js without Bun.
|
|
16
|
-
- Configure binary download (optional): `KODE_SKIP_BINARY_DOWNLOAD=1`, `KODE_BIN_DIR`, `KODE_BINARY_BASE_URL`.
|
|
393
|
+
Interactive equivalents:
|
|
17
394
|
|
|
18
|
-
|
|
395
|
+
```text
|
|
396
|
+
/plugin marketplace add owner/repo
|
|
397
|
+
/plugin install document-skills@anthropic-agent-skills --scope user
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### Use skills
|
|
401
|
+
|
|
402
|
+
- In interactive mode, run a skill as a slash command: `/pdf`, `/xlsx`, etc.
|
|
403
|
+
- Kode can also invoke skills automatically via the `Skill` tool when relevant.
|
|
404
|
+
|
|
405
|
+
### Create a skill (Agent Skills)
|
|
406
|
+
|
|
407
|
+
Create `./.kode/skills/<skill-name>/SKILL.md` (project) or `~/.kode/skills/<skill-name>/SKILL.md` (user):
|
|
408
|
+
|
|
409
|
+
```md
|
|
410
|
+
---
|
|
411
|
+
name: my-skill
|
|
412
|
+
description: Describe what this skill does and when to use it.
|
|
413
|
+
allowed-tools: Read Bash(git:*) Bash(jq:*)
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
# Skill instructions
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Naming rules:
|
|
420
|
+
- `name` must match the folder name
|
|
421
|
+
- Lowercase letters/numbers/hyphens only, 1–64 chars
|
|
422
|
+
|
|
423
|
+
Compatibility:
|
|
424
|
+
- Kode also discovers `.claude/skills` and `.claude/commands` for legacy compatibility.
|
|
425
|
+
|
|
426
|
+
### Distribute skills
|
|
427
|
+
|
|
428
|
+
- Marketplace repo: publish a repo containing `.kode-plugin/marketplace.json` listing plugin packs and their `skills` directories (legacy `.claude-plugin/marketplace.json` is also supported).
|
|
429
|
+
- Plugin repo: for full plugins (beyond skills), include `.kode-plugin/plugin.json` at the plugin root and keep all paths relative (`./...`).
|
|
430
|
+
|
|
431
|
+
See `docs/skills.md` for a compact reference and examples.
|
|
432
|
+
|
|
433
|
+
### Output styles
|
|
19
434
|
|
|
20
|
-
|
|
21
|
-
|
|
435
|
+
Use output styles to switch system-prompt behavior.
|
|
436
|
+
|
|
437
|
+
- Select: `/output-style` (menu) or `/output-style <style>`
|
|
438
|
+
- Built-ins: `default`, `Explanatory`, `Learning`
|
|
439
|
+
- Stored per-project in `./.kode/settings.local.json` as `outputStyle` (legacy `.claude/settings.local.json` is supported)
|
|
440
|
+
- Custom styles: Markdown files under `output-styles/` in `.claude`/`.kode` user + project locations
|
|
441
|
+
- Plugins can provide styles under `output-styles/` (or manifest `outputStyles`); plugin styles are namespaced as `<plugin>:<style>`
|
|
442
|
+
|
|
443
|
+
See `docs/output-styles.md`.
|
|
444
|
+
|
|
445
|
+
## Multi-Model Intelligent Collaboration
|
|
446
|
+
|
|
447
|
+
Unlike single-model CLIs, Kode implements **true multi-model collaboration**, allowing you to fully leverage the unique strengths of different AI models.
|
|
448
|
+
|
|
449
|
+
### 🏗️ Core Technical Architecture
|
|
450
|
+
|
|
451
|
+
#### 1. **ModelManager Multi-Model Manager**
|
|
452
|
+
We designed a unified `ModelManager` system that supports:
|
|
453
|
+
- **Model Profiles**: Each model has an independent configuration file containing API endpoints, authentication, context window size, cost parameters, etc.
|
|
454
|
+
- **Model Pointers**: Users can configure default models for different purposes in the `/model` command:
|
|
455
|
+
- `main`: Default model for main Agent
|
|
456
|
+
- `task`: Default model for SubAgent
|
|
457
|
+
- `compact`: Model used for automatic context compression when nearing the context window
|
|
458
|
+
- `quick`: Fast model for simple operations and utilities
|
|
459
|
+
- **Dynamic Model Switching**: Support runtime model switching without restarting sessions, maintaining context continuity
|
|
460
|
+
|
|
461
|
+
#### 📦 Shareable Model Config (YAML)
|
|
462
|
+
|
|
463
|
+
You can export/import model profiles + pointers as a team-shareable YAML file. By default, exports do **not** include plaintext API keys (use env vars instead).
|
|
22
464
|
|
|
23
|
-
Run:
|
|
24
465
|
```bash
|
|
25
|
-
|
|
26
|
-
|
|
466
|
+
# Export to a file (or omit --output to print to stdout)
|
|
467
|
+
kode models export --output kode-models.yaml
|
|
468
|
+
|
|
469
|
+
# Import (merge by default)
|
|
470
|
+
kode models import kode-models.yaml
|
|
471
|
+
|
|
472
|
+
# Replace existing profiles instead of merging
|
|
473
|
+
kode models import --replace kode-models.yaml
|
|
474
|
+
|
|
475
|
+
# List configured profiles + pointers
|
|
476
|
+
kode models list
|
|
27
477
|
```
|
|
28
478
|
|
|
479
|
+
Example `kode-models.yaml`:
|
|
480
|
+
|
|
481
|
+
```yaml
|
|
482
|
+
version: 1
|
|
483
|
+
profiles:
|
|
484
|
+
- name: OpenAI Main
|
|
485
|
+
provider: openai
|
|
486
|
+
modelName: gpt-4o
|
|
487
|
+
maxTokens: 8192
|
|
488
|
+
contextLength: 128000
|
|
489
|
+
apiKey:
|
|
490
|
+
fromEnv: OPENAI_API_KEY
|
|
491
|
+
pointers:
|
|
492
|
+
main: gpt-4o
|
|
493
|
+
task: gpt-4o
|
|
494
|
+
compact: gpt-4o
|
|
495
|
+
quick: gpt-4o
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
#### 2. **TaskTool Intelligent Task Distribution**
|
|
499
|
+
Our specially designed `TaskTool` (Architect tool) implements:
|
|
500
|
+
- **Subagent Mechanism**: Can launch multiple sub-agents to process tasks in parallel
|
|
501
|
+
- **Model Parameter Passing**: Users can specify which model SubAgents should use in their requests
|
|
502
|
+
- **Default Model Configuration**: SubAgents use the model configured by the `task` pointer by default
|
|
503
|
+
|
|
504
|
+
#### 3. **AskExpertModel Expert Consultation Tool**
|
|
505
|
+
We specially designed the `AskExpertModel` tool:
|
|
506
|
+
- **Expert Model Invocation**: Allows temporarily calling specific expert models to solve difficult problems during conversations
|
|
507
|
+
- **Model Isolation Execution**: Expert model responses are processed independently without affecting the main conversation flow
|
|
508
|
+
- **Knowledge Integration**: Integrates expert model insights into the current task
|
|
509
|
+
|
|
510
|
+
#### 🎯 Flexible Model Switching
|
|
511
|
+
- **Option+M Quick Switch**: Press Option+M in the input box to cycle the main conversation model
|
|
512
|
+
- **`/model` Command**: Use `/model` command to configure and manage multiple model profiles, set default models for different purposes
|
|
513
|
+
- **User Control**: Users can specify specific models for task processing at any time
|
|
514
|
+
|
|
515
|
+
#### 🔄 Intelligent Work Allocation Strategy
|
|
516
|
+
|
|
517
|
+
**Architecture Design Phase**
|
|
518
|
+
- Use **o3 model** or **GPT-5 model** to explore system architecture and formulate sharp and clear technical solutions
|
|
519
|
+
- These models excel in abstract thinking and system design
|
|
520
|
+
|
|
521
|
+
**Solution Refinement Phase**
|
|
522
|
+
- Use **gemini model** to deeply explore production environment design details
|
|
523
|
+
- Leverage its deep accumulation in practical engineering and balanced reasoning capabilities
|
|
524
|
+
|
|
525
|
+
**Code Implementation Phase**
|
|
526
|
+
- Use **Qwen Coder model**, **Kimi k2 model**, **GLM-4.5 model**, or **Claude Sonnet 4 model** for specific code writing
|
|
527
|
+
- These models have strong performance in code generation, file editing, and engineering implementation
|
|
528
|
+
- Support parallel processing of multiple coding tasks through subagents
|
|
529
|
+
|
|
530
|
+
**Problem Solving**
|
|
531
|
+
- When encountering complex problems, consult expert models like **o3 model**, **Claude Opus 4.1 model**, or **Grok 4 model**
|
|
532
|
+
- Obtain deep technical insights and innovative solutions
|
|
533
|
+
|
|
534
|
+
#### 💡 Practical Application Scenarios
|
|
535
|
+
|
|
536
|
+
```bash
|
|
537
|
+
# Example 1: Architecture Design
|
|
538
|
+
"Use o3 model to help me design a high-concurrency message queue system architecture"
|
|
539
|
+
|
|
540
|
+
# Example 2: Multi-Model Collaboration
|
|
541
|
+
"First use GPT-5 model to analyze the root cause of this performance issue, then use Claude Sonnet 4 model to write optimization code"
|
|
542
|
+
|
|
543
|
+
# Example 3: Parallel Task Processing
|
|
544
|
+
"Use Qwen Coder model as subagent to refactor these three modules simultaneously"
|
|
545
|
+
|
|
546
|
+
# Example 4: Expert Consultation
|
|
547
|
+
"This memory leak issue is tricky, ask Claude Opus 4.1 model separately for solutions"
|
|
548
|
+
|
|
549
|
+
# Example 5: Code Review
|
|
550
|
+
"Have Kimi k2 model review the code quality of this PR"
|
|
551
|
+
|
|
552
|
+
# Example 6: Complex Reasoning
|
|
553
|
+
"Use Grok 4 model to help me derive the time complexity of this algorithm"
|
|
554
|
+
|
|
555
|
+
# Example 7: Solution Design
|
|
556
|
+
"Have GLM-4.5 model design a microservice decomposition plan"
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
### 🛠️ Key Implementation Mechanisms
|
|
560
|
+
|
|
561
|
+
#### **Configuration System**
|
|
562
|
+
```typescript
|
|
563
|
+
// Example of multi-model configuration support
|
|
564
|
+
{
|
|
565
|
+
"modelProfiles": [
|
|
566
|
+
{ "name": "o3", "provider": "openai", "modelName": "o3", "apiKey": "...", "maxTokens": 1024, "contextLength": 128000, "isActive": true, "createdAt": 1710000000000 },
|
|
567
|
+
{ "name": "qwen", "provider": "alibaba", "modelName": "qwen-coder", "apiKey": "...", "maxTokens": 1024, "contextLength": 128000, "isActive": true, "createdAt": 1710000000001 }
|
|
568
|
+
],
|
|
569
|
+
"modelPointers": {
|
|
570
|
+
"main": "o3", // Main conversation model
|
|
571
|
+
"task": "qwen-coder", // Sub-agent model
|
|
572
|
+
"compact": "o3", // Context compression model
|
|
573
|
+
"quick": "o3" // Quick operations model
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
#### **Cost Tracking System**
|
|
579
|
+
- **Usage Statistics**: Use `/cost` command to view token usage and costs for each model
|
|
580
|
+
- **Multi-Model Cost Comparison**: Track usage costs of different models in real-time
|
|
581
|
+
- **History Records**: Save cost data for each session
|
|
582
|
+
|
|
583
|
+
#### **Context Manager**
|
|
584
|
+
- **Context Inheritance**: Maintain conversation continuity when switching models
|
|
585
|
+
- **Context Window Adaptation**: Automatically adjust based on different models' context window sizes
|
|
586
|
+
- **Session State Preservation**: Ensure information consistency during multi-model collaboration
|
|
587
|
+
|
|
588
|
+
### 🚀 Advantages of Multi-Model Collaboration
|
|
589
|
+
|
|
590
|
+
1. **Maximized Efficiency**: Each task is handled by the most suitable model
|
|
591
|
+
2. **Cost Optimization**: Use lightweight models for simple tasks, powerful models for complex tasks
|
|
592
|
+
3. **Parallel Processing**: Multiple models can work on different subtasks simultaneously
|
|
593
|
+
4. **Flexible Switching**: Switch models based on task requirements without restarting sessions
|
|
594
|
+
5. **Leveraging Strengths**: Combine advantages of different models for optimal overall results
|
|
595
|
+
|
|
596
|
+
### 📊 Comparison (Single-model CLI)
|
|
597
|
+
|
|
598
|
+
| Feature | Kode | Single-model CLI |
|
|
599
|
+
|---------|------|-----------------|
|
|
600
|
+
| Number of Supported Models | Unlimited, configurable for any model | Only supports one model |
|
|
601
|
+
| Model Switching | ✅ Option+M quick switch | ❌ Requires session restart |
|
|
602
|
+
| Parallel Processing | ✅ Multiple SubAgents work in parallel | ❌ Single-threaded processing |
|
|
603
|
+
| Cost Tracking | ✅ Separate statistics for multiple models | ❌ Single model cost |
|
|
604
|
+
| Task Model Configuration | ✅ Different default models for different purposes | ❌ Same model for all tasks |
|
|
605
|
+
| Expert Consultation | ✅ AskExpertModel tool | ❌ Not supported |
|
|
606
|
+
|
|
607
|
+
This multi-model collaboration capability makes Kode a true **AI Development Workbench**, not just a single AI assistant.
|
|
608
|
+
|
|
29
609
|
## Development
|
|
30
610
|
|
|
611
|
+
Kode is built with modern tools and requires [Bun](https://bun.sh) for development.
|
|
612
|
+
|
|
613
|
+
### Install Bun
|
|
614
|
+
|
|
31
615
|
```bash
|
|
616
|
+
# macOS/Linux
|
|
617
|
+
curl -fsSL https://bun.sh/install | bash
|
|
618
|
+
|
|
619
|
+
# Windows
|
|
620
|
+
powershell -c "irm bun.sh/install.ps1 | iex"
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
### Setup Development Environment
|
|
624
|
+
|
|
625
|
+
```bash
|
|
626
|
+
# Clone the repository
|
|
627
|
+
git clone https://github.com/shareAI-lab/kode.git
|
|
628
|
+
cd kode
|
|
629
|
+
|
|
630
|
+
# Install dependencies
|
|
32
631
|
bun install
|
|
632
|
+
|
|
633
|
+
# Run in development mode
|
|
33
634
|
bun run dev
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
### Build
|
|
638
|
+
|
|
639
|
+
```bash
|
|
640
|
+
bun run build
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### Testing
|
|
644
|
+
|
|
645
|
+
```bash
|
|
646
|
+
# Run tests
|
|
34
647
|
bun test
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
bun run build:binary
|
|
648
|
+
|
|
649
|
+
# Test the CLI
|
|
650
|
+
./cli.js --help
|
|
39
651
|
```
|
|
40
652
|
|
|
41
|
-
##
|
|
653
|
+
## Contributing
|
|
654
|
+
|
|
655
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
656
|
+
|
|
657
|
+
## License
|
|
658
|
+
|
|
659
|
+
Apache 2.0 License - see [LICENSE](LICENSE) for details.
|
|
660
|
+
|
|
661
|
+
## Thanks
|
|
662
|
+
|
|
663
|
+
- Some code from @dnakov's anonkode
|
|
664
|
+
- Some UI learned from gemini-cli
|
|
665
|
+
- Some system design learned from upstream agent CLIs
|
|
666
|
+
|
|
667
|
+
## Support
|
|
42
668
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- `docs/release_checklist.md`: release checklist (npm + binaries)
|
|
47
|
-
- `docs/baseline_verification.md`: baseline verification record
|
|
669
|
+
- 📚 [Documentation](docs/)
|
|
670
|
+
- 🐛 [Report Issues](https://github.com/shareAI-lab/kode/issues)
|
|
671
|
+
- 💬 [Discussions](https://github.com/shareAI-lab/kode/discussions)
|