Suggestion: add kaimon_connect command #28

Closed
opened 2026-04-18 08:39:57 -07:00 by langestefan · 2 comments
langestefan commented 2026-04-18 08:39:57 -07:00 (Migrated from github.com)

For some projects, I prefer not to use startup.jl to launch the kaimon gate.

Instead, I open a local julia REPL and then run kaimon_connect().

With kaimon_connect() just cat ~/.julia/config/startup.jl:

function kaimon_connect()
    # Kaimon Gate — auto-connect this REPL to the TUI server
    try
        @eval import Revise
        catch e
        @info "ℹ Revise not loaded (optional - install with: Pkg.add(\"Revise\"))"
    end
    try
        @eval begin
            import Kaimon
            Kaimon.Gate.serve()
        end
        catch e
        @warn "Kaimon Gate failed to start" exception = e
    end
end

This enables you to launch the gate on demand.

For some projects, I prefer not to use `startup.jl` to launch the kaimon gate. Instead, I open a local julia REPL and then run `kaimon_connect()`. With `kaimon_connect()` just `cat ~/.julia/config/startup.jl`: ```julia function kaimon_connect() # Kaimon Gate — auto-connect this REPL to the TUI server try @eval import Revise catch e @info "ℹ Revise not loaded (optional - install with: Pkg.add(\"Revise\"))" end try @eval begin import Kaimon Kaimon.Gate.serve() end catch e @warn "Kaimon Gate failed to start" exception = e end end ``` This enables you to launch the gate on demand.
kahliburke commented 2026-04-20 14:41:16 -07:00 (Migrated from github.com)

@langestefan Nice suggestion! We can ship this as a convenience function in the Kaimon module itself so it's available anywhere Kaimon is installed — no need to add it to your startup.jl manually.

Something like:

using Kaimon
Kaimon.connect!()  # loads Revise if available, then Gate.serve()

Will add this.

@langestefan Nice suggestion! We can ship this as a convenience function in the Kaimon module itself so it's available anywhere Kaimon is installed — no need to add it to your startup.jl manually. Something like: ```julia using Kaimon Kaimon.connect!() # loads Revise if available, then Gate.serve() ``` Will add this.
kahliburke commented 2026-04-20 14:42:46 -07:00 (Migrated from github.com)

Added Kaimon.connect!() in 30d378d. Loads Revise if available, then starts the gate:

using Kaimon
Kaimon.connect!()

Available from the next release.

Added `Kaimon.connect!()` in 30d378d. Loads Revise if available, then starts the gate: ```julia using Kaimon Kaimon.connect!() ``` Available from the next release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kahliburke/Kaimon.jl#28
No description provided.