@codeflyai/codefly 0.24.0

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.
Files changed (104) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +375 -0
  3. package/bundle/codefly.js +486433 -0
  4. package/bundle/docs/architecture.md +80 -0
  5. package/bundle/docs/assets/connected_devtools.png +0 -0
  6. package/bundle/docs/assets/gemini-screenshot.png +0 -0
  7. package/bundle/docs/assets/release_patch.png +0 -0
  8. package/bundle/docs/assets/theme-ansi-light.png +0 -0
  9. package/bundle/docs/assets/theme-ansi.png +0 -0
  10. package/bundle/docs/assets/theme-atom-one.png +0 -0
  11. package/bundle/docs/assets/theme-ayu-light.png +0 -0
  12. package/bundle/docs/assets/theme-ayu.png +0 -0
  13. package/bundle/docs/assets/theme-custom.png +0 -0
  14. package/bundle/docs/assets/theme-default-light.png +0 -0
  15. package/bundle/docs/assets/theme-default.png +0 -0
  16. package/bundle/docs/assets/theme-dracula.png +0 -0
  17. package/bundle/docs/assets/theme-github-light.png +0 -0
  18. package/bundle/docs/assets/theme-github.png +0 -0
  19. package/bundle/docs/assets/theme-google-light.png +0 -0
  20. package/bundle/docs/assets/theme-xcode-light.png +0 -0
  21. package/bundle/docs/changelogs/index.md +592 -0
  22. package/bundle/docs/changelogs/latest.md +225 -0
  23. package/bundle/docs/changelogs/preview.md +129 -0
  24. package/bundle/docs/changelogs/releases.md +896 -0
  25. package/bundle/docs/cli/authentication.md +3 -0
  26. package/bundle/docs/cli/checkpointing.md +94 -0
  27. package/bundle/docs/cli/codefly-ignore.md +71 -0
  28. package/bundle/docs/cli/codefly-md.md +109 -0
  29. package/bundle/docs/cli/commands.md +354 -0
  30. package/bundle/docs/cli/configuration.md +780 -0
  31. package/bundle/docs/cli/custom-commands.md +315 -0
  32. package/bundle/docs/cli/enterprise.md +565 -0
  33. package/bundle/docs/cli/generation-settings.md +210 -0
  34. package/bundle/docs/cli/headless.md +388 -0
  35. package/bundle/docs/cli/index.md +63 -0
  36. package/bundle/docs/cli/keyboard-shortcuts.md +143 -0
  37. package/bundle/docs/cli/model-routing.md +37 -0
  38. package/bundle/docs/cli/model.md +62 -0
  39. package/bundle/docs/cli/sandbox.md +171 -0
  40. package/bundle/docs/cli/session-management.md +158 -0
  41. package/bundle/docs/cli/settings.md +113 -0
  42. package/bundle/docs/cli/system-prompt.md +95 -0
  43. package/bundle/docs/cli/telemetry.md +792 -0
  44. package/bundle/docs/cli/themes.md +237 -0
  45. package/bundle/docs/cli/token-caching.md +20 -0
  46. package/bundle/docs/cli/trusted-folders.md +95 -0
  47. package/bundle/docs/cli/tutorials.md +83 -0
  48. package/bundle/docs/cli/uninstall.md +47 -0
  49. package/bundle/docs/core/index.md +101 -0
  50. package/bundle/docs/core/memport.md +244 -0
  51. package/bundle/docs/core/policy-engine.md +267 -0
  52. package/bundle/docs/core/tools-api.md +131 -0
  53. package/bundle/docs/examples/proxy-script.md +83 -0
  54. package/bundle/docs/extensions/extension-releasing.md +183 -0
  55. package/bundle/docs/extensions/getting-started-extensions.md +245 -0
  56. package/bundle/docs/extensions/index.md +293 -0
  57. package/bundle/docs/faq.md +154 -0
  58. package/bundle/docs/get-started/authentication.md +321 -0
  59. package/bundle/docs/get-started/configuration-v1.md +888 -0
  60. package/bundle/docs/get-started/configuration.md +1524 -0
  61. package/bundle/docs/get-started/deployment.md +143 -0
  62. package/bundle/docs/get-started/examples.md +219 -0
  63. package/bundle/docs/get-started/gemini-3.md +116 -0
  64. package/bundle/docs/get-started/index.md +71 -0
  65. package/bundle/docs/get-started/installation.md +141 -0
  66. package/bundle/docs/hooks/best-practices.md +856 -0
  67. package/bundle/docs/hooks/index.md +687 -0
  68. package/bundle/docs/hooks/reference.md +168 -0
  69. package/bundle/docs/hooks/writing-hooks.md +1026 -0
  70. package/bundle/docs/ide-integration/ide-companion-spec.md +267 -0
  71. package/bundle/docs/ide-integration/index.md +202 -0
  72. package/bundle/docs/index.md +147 -0
  73. package/bundle/docs/integration-tests.md +211 -0
  74. package/bundle/docs/issue-and-pr-automation.md +134 -0
  75. package/bundle/docs/local-development.md +128 -0
  76. package/bundle/docs/mermaid/context.mmd +103 -0
  77. package/bundle/docs/mermaid/render-path.mmd +64 -0
  78. package/bundle/docs/npm.md +62 -0
  79. package/bundle/docs/quota-and-pricing.md +158 -0
  80. package/bundle/docs/release-confidence.md +164 -0
  81. package/bundle/docs/releases.md +540 -0
  82. package/bundle/docs/sidebar.json +297 -0
  83. package/bundle/docs/tools/file-system.md +217 -0
  84. package/bundle/docs/tools/index.md +95 -0
  85. package/bundle/docs/tools/mcp-server.md +1044 -0
  86. package/bundle/docs/tools/memory.md +54 -0
  87. package/bundle/docs/tools/shell.md +260 -0
  88. package/bundle/docs/tools/todos.md +57 -0
  89. package/bundle/docs/tools/web-fetch.md +59 -0
  90. package/bundle/docs/tools/web-search.md +42 -0
  91. package/bundle/docs/tos-privacy.md +96 -0
  92. package/bundle/docs/troubleshooting.md +158 -0
  93. package/bundle/policies/agent.toml +31 -0
  94. package/bundle/policies/discovered.toml +8 -0
  95. package/bundle/policies/read-only.toml +61 -0
  96. package/bundle/policies/write.toml +78 -0
  97. package/bundle/policies/yolo.toml +31 -0
  98. package/bundle/sandbox-macos-permissive-closed.sb +32 -0
  99. package/bundle/sandbox-macos-permissive-open.sb +27 -0
  100. package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
  101. package/bundle/sandbox-macos-restrictive-closed.sb +93 -0
  102. package/bundle/sandbox-macos-restrictive-open.sb +96 -0
  103. package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
  104. package/package.json +148 -0
@@ -0,0 +1,80 @@
1
+ # Gemini CLI Architecture Overview
2
+
3
+ This document provides a high-level overview of the Gemini CLI's architecture.
4
+
5
+ ## Core components
6
+
7
+ The Gemini CLI is primarily composed of two main packages, along with a suite of
8
+ tools that can be used by the system in the course of handling command-line
9
+ input:
10
+
11
+ 1. **CLI package (`packages/cli`):**
12
+ - **Purpose:** This contains the user-facing portion of the Gemini CLI, such
13
+ as handling the initial user input, presenting the final output, and
14
+ managing the overall user experience.
15
+ - **Key functions contained in the package:**
16
+ - [Input processing](/docs/cli/commands.md)
17
+ - History management
18
+ - Display rendering
19
+ - [Theme and UI customization](/docs/cli/themes.md)
20
+ - [CLI configuration settings](/docs/get-started/configuration.md)
21
+
22
+ 2. **Core package (`packages/core`):**
23
+ - **Purpose:** This acts as the backend for the Gemini CLI. It receives
24
+ requests sent from `packages/cli`, orchestrates interactions with the
25
+ Gemini API, and manages the execution of available tools.
26
+ - **Key functions contained in the package:**
27
+ - API client for communicating with the Google Gemini API
28
+ - Prompt construction and management
29
+ - Tool registration and execution logic
30
+ - State management for conversations or sessions
31
+ - Server-side configuration
32
+
33
+ 3. **Tools (`packages/core/src/tools/`):**
34
+ - **Purpose:** These are individual modules that extend the capabilities of
35
+ the Gemini model, allowing it to interact with the local environment
36
+ (e.g., file system, shell commands, web fetching).
37
+ - **Interaction:** `packages/core` invokes these tools based on requests
38
+ from the Gemini model.
39
+
40
+ ## Interaction flow
41
+
42
+ A typical interaction with the Gemini CLI follows this flow:
43
+
44
+ 1. **User input:** The user types a prompt or command into the terminal, which
45
+ is managed by `packages/cli`.
46
+ 2. **Request to core:** `packages/cli` sends the user's input to
47
+ `packages/core`.
48
+ 3. **Request processed:** The core package:
49
+ - Constructs an appropriate prompt for the Gemini API, possibly including
50
+ conversation history and available tool definitions.
51
+ - Sends the prompt to the Gemini API.
52
+ 4. **Gemini API response:** The Gemini API processes the prompt and returns a
53
+ response. This response might be a direct answer or a request to use one of
54
+ the available tools.
55
+ 5. **Tool execution (if applicable):**
56
+ - When the Gemini API requests a tool, the core package prepares to execute
57
+ it.
58
+ - If the requested tool can modify the file system or execute shell
59
+ commands, the user is first given details of the tool and its arguments,
60
+ and the user must approve the execution.
61
+ - Read-only operations, such as reading files, might not require explicit
62
+ user confirmation to proceed.
63
+ - Once confirmed, or if confirmation is not required, the core package
64
+ executes the relevant action within the relevant tool, and the result is
65
+ sent back to the Gemini API by the core package.
66
+ - The Gemini API processes the tool result and generates a final response.
67
+ 6. **Response to CLI:** The core package sends the final response back to the
68
+ CLI package.
69
+ 7. **Display to user:** The CLI package formats and displays the response to
70
+ the user in the terminal.
71
+
72
+ ## Key design principles
73
+
74
+ - **Modularity:** Separating the CLI (frontend) from the Core (backend) allows
75
+ for independent development and potential future extensions (e.g., different
76
+ frontends for the same backend).
77
+ - **Extensibility:** The tool system is designed to be extensible, allowing new
78
+ capabilities to be added.
79
+ - **User experience:** The CLI focuses on providing a rich and interactive
80
+ terminal experience.
Binary file