MCPcopy Create free account

hub / github.com/LiberBinjio/claude-cli-rs / functions

Functions1,121 in github.com/LiberBinjio/claude-cli-rs

↓ 107 callersMethodpush
Append a fully-formed message. Auto-scrolls to bottom when enabled.
crates/tui/src/message_view.rs:69
↓ 54 callersMethodlen
(&self)
crates/query/src/tool_set.rs:58
↓ 53 callersMethodhandle_key
Process a key event. Returns `true` when the user pressed Enter (without Shift) — i.e. the input should be submitted.
crates/tui/src/prompt_input.rs:86
↓ 50 callersFunctionkey
(code: KeyCode)
crates/tui/src/prompt_input.rs:233
↓ 36 callersMethodregister
Register a tool. Overwrites any existing tool with the same name.
crates/tools/src/registry.rs:24
↓ 33 callersMethodget
(&self, name: &str)
crates/tools/src/registry.rs:37
↓ 31 callersMethodis_empty
(&self)
crates/tui/src/prompt_input.rs:66
↓ 30 callersMethodis_empty
(&self)
crates/query/src/tool_set.rs:64
↓ 24 callersFunctiondark
()
crates/tui/src/markdown_render.rs:204
↓ 23 callersMethodregister
Register a new command.
crates/commands/src/registry.rs:22
↓ 21 callersMethodfind
(&self, name: &str)
crates/tools/src/registry.rs:44
↓ 15 callersFunctionparse_sse_event
(event_type: &str, data: &str)
crates/api/src/streaming.rs:89
↓ 15 callersFunctionsetup_registry
()
tests/integration/test_commands.rs:6
↓ 14 callersMethodget
(&mut self, name: &str)
crates/mcp/src/manager.rs:57
↓ 14 callersMethodhandle_key
Process a key event.
crates/tui/src/permission_dialog.rs:54
↓ 14 callersFunctionkey
(code: KeyCode)
crates/tui/src/permission_dialog.rs:176
↓ 14 callersMethodnext
Receive the next event, or `None` if the channel closed.
crates/tui/src/event.rs:38
↓ 14 callersMethodto_json
Serialize to a JSON string. # Errors Returns an error if serialization fails (unlikely for well-formed enums).
crates/bridge/src/messaging.rs:51
↓ 12 callersFunctionresolve_api_provider
Resolve the API provider from environment variables and stored credentials. Priority order: 1. `CLAUDE_CODE_USE_BEDROCK=1` -> Bedrock 2. `CLAUDE_CODE
crates/auth/src/providers.rs:48
↓ 11 callersMethodall
(&self)
crates/tools/src/registry.rs:51
↓ 10 callersFunctionhome_dir
()
crates/utils/src/platform.rs:28
↓ 10 callersFunctionmake_engine
()
crates/query/src/engine.rs:204
↓ 10 callersFunctionsetup_full_registry
()
tests/integration/test_tools.rs:9
↓ 9 callersFunctionapply_edit
Replace `old_string` with `new_string` inside `content`. `old_string` must appear exactly once; otherwise returns `EditError`.
crates/utils/src/diff.rs:35
↓ 9 callersFunctionregistry_with_dummy
()
crates/commands/src/registry.rs:111
↓ 8 callersMethodbuild_request_info
Build the URL and headers for the request based on the provider.
crates/api/src/client.rs:77
↓ 8 callersMethodcall
(&self, _input: Value, _ctx: &mut ToolUseContext)
crates/tools/src/lsp.rs:32
↓ 8 callersFunctionrender_markdown
(text: &str, theme: &Theme)
crates/tui/src/markdown_render.rs:13
↓ 7 callersFunctionchar_count
(s: &str)
crates/tui/src/prompt_input.rs:24
↓ 7 callersFunctionexecute_shell
Execute a shell command asynchronously, with optional timeout.
crates/utils/src/shell.rs:31
↓ 7 callersFunctionnormalize_messages
(messages: &[Message])
crates/api/src/normalize.rs:12
↓ 7 callersMethodprocess_user_input
Process user input: dispatch slash commands or run a query.
crates/query/src/engine.rs:108
↓ 6 callersFunctionbuild_system_prompt
(config: &AppConfig, cwd: &Path, tool_names: &[String])
crates/query/src/system_prompt.rs:11
↓ 6 callersFunctioncreate_default_registry
()
crates/tools/src/lib.rs:99
↓ 6 callersFunctionmake_client
(provider: ApiProvider)
crates/api/src/client.rs:168
↓ 6 callersMethodrender_unified
(&self, theme: &Theme)
crates/tui/src/diff_view.rs:88
↓ 6 callersFunctionrun_cli
Run the CLI with given args and return (stdout, stderr, success).
tests/integration/test_cli.rs:9
↓ 6 callersFunctiontask_manager
()
crates/tools/src/shared/mod.rs:13
↓ 6 callersMethodtotal_cost_usd
Estimate total cost in USD based on model pricing. Pricing (per million tokens) as of 2025: - claude-sonnet-4: input $3, output $15, cache-read $0.30
crates/services/src/cost.rs:33
↓ 5 callersMethodcall
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/file_read.rs:58
↓ 5 callersMethodcall
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/file_edit.rs:53
↓ 5 callersMethodcall
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/file_write.rs:54
↓ 5 callersMethodcall
Low-level RPC helper: send request, receive response, extract `.result`.
crates/mcp/src/client.rs:127
↓ 5 callersFunctioncompact_messages
(messages: &[Message], config: &CompactConfig)
crates/query/src/compact.rs:61
↓ 5 callersFunctioncreate_task
(description: &str)
crates/tools/src/shared/mod.rs:62
↓ 5 callersFunctioncreate_test_engine
Create a fully wired [`QueryEngine`] pointing at the mock server.
tests/integration/helpers/mod.rs:20
↓ 5 callersFunctioncreate_tool_context
Create a [`ToolUseContext`] for testing tools against a temporary directory.
tests/integration/helpers/mod.rs:47
↓ 5 callersFunctionctx
(dir: &TempDir)
crates/tools/src/file_read.rs:103
↓ 5 callersFunctionctx
(dir: &TempDir)
crates/tools/src/file_edit.rs:80
↓ 5 callersFunctionctx
(dir: &TempDir)
crates/tools/src/file_write.rs:96
↓ 5 callersFunctiondecode_jwt_claims
Decode the payload (claims) section of a JWT **without** verifying the signature. This is useful for extracting metadata such as `exp` or `sub`. # E
crates/bridge/src/auth.rs:36
↓ 5 callersFunctionestimate_messages_tokens
(messages: &[Message])
crates/query/src/compact.rs:27
↓ 5 callersMethodhandle_key
Handle a key event. Returns `true` when the user presses Enter to submit the key.
crates/tui/src/onboarding.rs:39
↓ 5 callersFunctionkey
(code: KeyCode)
crates/tui/src/onboarding.rs:131
↓ 5 callersFunctionrender_inline
Parse inline Markdown (`**bold**`, `*italic*`, `` `code` ``) and return a `Vec<Span>`.
crates/tui/src/markdown_render.rs:119
↓ 5 callersFunctionsessions_dir
()
crates/services/src/session.rs:21
↓ 4 callersFunctionatomic_write
Write `content` atomically: write to a temporary sibling file, then rename.
crates/utils/src/fs.rs:30
↓ 4 callersMethodcall
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/glob.rs:56
↓ 4 callersMethodcall
(&self, input: Value, ctx: &mut ToolUseContext)
crates/tools/src/bash.rs:113
↓ 4 callersFunctionchar_to_byte_index
(s: &str, char_idx: usize)
crates/tui/src/prompt_input.rs:15
↓ 4 callersFunctionconsume_stream
Consume a stream of `StreamEvent`s, collecting block accumulators.
crates/query/src/query_loop.rs:152
↓ 4 callersFunctionctx
(dir: &TempDir)
crates/tools/src/glob.rs:106
↓ 4 callersFunctiongenerate_summary
Generate a text summary from a list of old messages.
crates/query/src/compact.rs:79
↓ 4 callersFunctiongit
Run a git command in `cwd` and return stdout on success.
crates/utils/src/git.rs:8
↓ 4 callersFunctionpad_to_width
Pad (or truncate) `s` to exactly `width` display columns, respecting Unicode character widths.
crates/tui/src/diff_view.rs:184
↓ 4 callersFunctionread_file_in_range
Read lines `start..=end` from `path` (1-indexed, inclusive).
crates/utils/src/fs.rs:17
↓ 4 callersFunctionresolve_path
(base: &Path, rel: &str)
crates/utils/src/fs.rs:53
↓ 4 callersMethodscroll_up
(&mut self, amount: u16)
crates/tui/src/message_view.rs:95
↓ 4 callersMethodspawn
Spawn an MCP server process and prepare the transport.
crates/mcp/src/transport.rs:24
↓ 4 callersFunctionstrip_html_tags
Strip HTML tags, script/style content, and normalize whitespace.
crates/tools/src/web_fetch.rs:156
↓ 4 callersMethodsubmit
Clear the buffer, push non-empty text into history, and return the submitted text.
crates/tui/src/prompt_input.rs:175
↓ 4 callersFunctiontest_ctx
()
crates/tools/src/bash.rs:171
↓ 4 callersMethodtext
(&self)
crates/tui/src/prompt_input.rs:59
↓ 4 callersMethodtick
(&mut self)
crates/tui/src/app.rs:82
↓ 4 callersMethodto_api_schemas
(&self)
crates/tools/src/registry.rs:63
↓ 4 callersMethodtrack
Record an event.
crates/services/src/analytics.rs:42
↓ 4 callersFunctionwith_retry
Execute a fallible async operation with retries. Only retries on errors where [`ApiError::is_retryable`] returns `true`. Uses exponential backoff wit
crates/api/src/retry.rs:33
↓ 3 callersMethodadd_usage
Accumulate usage from an API response.
crates/services/src/cost.rs:20
↓ 3 callersFunctionbuild_search_command
Build the search command string, preferring rg.
crates/tools/src/grep.rs:101
↓ 3 callersFunctiondata_dir
()
crates/utils/src/platform.rs:34
↓ 3 callersMethodexecute
(&self, _args: &str, _ctx: &mut CommandContext)
crates/commands/src/registry.rs:106
↓ 3 callersFunctiongenerate_code_verifier
Generate a random PKCE code verifier (43-128 chars from unreserved set).
crates/auth/src/oauth.rs:154
↓ 3 callersFunctionget_api_key
()
crates/auth/src/api_key.rs:28
↓ 3 callersFunctionload_api_key
Load an API key from the system keychain. Returns `None` if not found.
crates/auth/src/keychain.rs:21
↓ 3 callersFunctionload_config
(path: &std::path::Path)
crates/tools/src/config_tool.rs:109
↓ 3 callersMethodnames
(&self)
crates/tools/src/registry.rs:57
↓ 3 callersFunctionregister_builtins
Register all built-in commands into the given registry.
crates/commands/src/builtin/mod.rs:29
↓ 3 callersFunctionregister_p0_tools
Register P0 tools (Bash, Grep) — core execution.
crates/tools/src/lib.rs:45
↓ 3 callersFunctionregister_p0b_tools
Register P0b tools (FileRead, FileWrite, FileEdit, Glob) — file operations (dev4).
crates/tools/src/lib.rs:51
↓ 3 callersFunctionrestore
Restore the terminal to its original state (reverse of [`init`]).
crates/tui/src/terminal.rs:27
↓ 3 callersMethodscroll_down
(&mut self, amount: u16)
crates/tui/src/message_view.rs:102
↓ 3 callersMethodsend_message
Send a [`BridgeMessage`] as a text frame.
crates/bridge/src/websocket.rs:41
↓ 3 callersFunctionsetup
Build all services from CLI arguments. This performs authentication, creates the API client, tool & command registries, and wires everything into a [
crates/cli/src/setup.rs:27
↓ 3 callersFunctionshift_key
(code: KeyCode)
crates/tui/src/prompt_input.rs:242
↓ 3 callersMethodtext
(s: impl Into<String>)
crates/core/src/tool.rs:23
↓ 3 callersFunctiontokens_path
()
crates/auth/src/oauth.rs:211
↓ 3 callersFunctionunified_diff
(old: &str, new: &str, filename: &str)
crates/utils/src/diff.rs:18
↓ 2 callersMethodadd_tokens
(&self, input: u64, output: u64)
crates/core/src/state.rs:82
↓ 2 callersMethodappend_streaming
Append partial text to the active stream.
crates/tui/src/message_view.rs:77
↓ 2 callersMethodauthorization_url
(&self, scope: &str)
crates/auth/src/oauth.rs:51
next →1–100 of 1,121, ranked by callers