MCPcopy Index your code
hub / github.com/aspizu/sb2gs

github.com/aspizu/sb2gs @main

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

sb2gs

Decompile Scratch projects into goboscript projects automatically.

Installation

Use Cargo to install sb2gs globally.

cargo install --git https://github.com/aspizu/sb2gs --package sb2gs-cli

Usage

You can directly download and decompile a Scratch project from its ID.

sb2gs --id 12345678 my_project_name --verify

Wasm

wasm-pack build crates/wasm --target web

--verify requires goboscript to be installed.

usage: sb2gs [-h] [--overwrite] [--id ID] [--verify] input [output]

positional arguments:
  input
  output

options:
  -h, --help   show this help message and exit
  --overwrite
  --id ID      Download the project with this ID.
  --verify     Invoke goboscript to verify that the decompiled code is valid. This does not indicate that the decompiled code is equivalent
               to the original.

Extension points exported contracts — how you extend this code

FS (Interface)
Receives generated goboscript text files. [2 implementers]
crates/decompiler/src/file_system.rs

Core symbols most depended-on inside this repo

print
called by 61
crates/decompiler/src/emit.rs
key
called by 61
crates/decompiler/src/json_ext.rs
string_key
called by 46
crates/decompiler/src/json_ext.rs
iprint
called by 38
crates/decompiler/src/emit.rs
object
called by 37
crates/decompiler/src/json_ext.rs
println
called by 26
crates/decompiler/src/emit.rs
field_text
called by 24
crates/decompiler/src/emit.rs
print_identifier
called by 21
crates/decompiler/src/emit.rs

Shape

Function 164
Method 21
Class 9
Enum 2
Interface 1

Languages

Rust100%

Modules by API surface

crates/decompiler/src/emit.rs107 symbols
crates/decompiler/src/lib.rs26 symbols
crates/decompiler/src/syntax.rs14 symbols
crates/decompiler/src/json_ext.rs11 symbols
crates/decompiler/src/errors.rs9 symbols
crates/decompiler/src/signatures.rs6 symbols
crates/decompiler/src/file_system.rs6 symbols
crates/cli/src/main.rs6 symbols
crates/wasm/src/lib.rs5 symbols
crates/cli/src/download.rs5 symbols
crates/wasm/src/errors.rs2 symbols

For agents

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

⬇ download graph artifact