MCPcopy Index your code
hub / github.com/ahmedakef/goshell

github.com/ahmedakef/goshell @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
39 symbols 100 edges 11 files 3 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Goshell

Goshell is REPL shell for golang.

the project is inspired by rango but took different decisions.

Table of Contents

Installation

go install github.com/ahmedakef/goshell@latest

Features

  • auto import the needed libraries using goimports just write fmt.Print() and fmt will be imported.
  • autocompletion for languages keywords and libraries's functions and types without the need for language server.
  • print the variablles by writing them, no need to use fmt.Print()
  • supports all shell line editing commands supported by liner
  • don't have dependancy on goimports

Examples

live demo

Example Demo

Simple variable printing

code you write generated code
>>> a:=1
>>> b:=2
>>> a
1
package main

import "fmt"

func main() {
    a := 1
    b := 2
    fmt.Println(a)
    use(a, b)
}

// used to avoid "declared and not used" error
func use(vals ...any) {
    for _, val := range vals {
        _ = val
    }
}
3 lines17 lines

Calling functions

code you write generated code
>>> func add(x,y int) int {
...     return x+y
... }
>>> a:=1
>>> b:=2
>>> add(a,b)
3
package main

import "fmt"

func add(x, y int) int {
    return x + y
}

func main() {
    a := 1
    b := 2
    fmt.Println(add(a, b))
    use(a, b)
}

// used to avoid "declared and not used" error
func use(vals ...any) {
    for _, val := range vals {
        _ = val
    }
}
6 lines21 lines

Contact

ahmedakef - aemed.akef.1@gmail.com

Core symbols most depended-on inside this repo

cleanUp
called by 3
manager.go
prepareProgram
called by 2
generator.go
ParseFunction
called by 2
parser.go
ParseStatement
called by 2
parser.go
Visit
called by 2
parser.go
newManager
called by 2
manager.go
addInput
called by 2
manager.go
removeLastInput
called by 2
manager.go

Shape

Function 24
Method 11
Struct 4

Languages

Go100%

Modules by API surface

manager.go15 symbols
parser.go5 symbols
main.go4 symbols
autocomplete.go4 symbols
scripts/visiter.go3 symbols
scripts/fetcher.go2 symbols
parser_test.go2 symbols
generator.go2 symbols
manager_test.go1 symbols
autocomplete_test.go1 symbols

For agents

$ claude mcp add goshell \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact