MCPcopy Index your code
hub / github.com/Jeffail/leaps

github.com/Jeffail/leaps @v0.9.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.9.1 ↗ · + Follow
518 symbols 1,704 edges 93 files 311 documented · 60%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Leaps

godoc for jeffail/leaps goreportcard for jeffail/leaps

Leaps is a service for collaboratively editing your local files over a web UI, using operational transforms to ensure zero-collision synchronization across any number of editing clients.

WARNING: This project is no longer actively maintained.

Screenshot

Run

Simply navigate to a directory you want to share, run leaps, open the hosted page (default http://localhost:8080) in your browser and direct any friends on your LAN to the same page. You can now collaboratively edit any documents in that directory.

Your files will be written to in the background as you edit. If you aren't using version control, or simply want extra protection, you can run leaps in safe mode with the --safe flag. In safe mode any changes you make will be placed in a .leaps_cot.json file, which you can then apply to your files once you are happy by running with the --commit flag.

Build/test commands from the UI

When writing code it sucks to have to leave the editor for running tests, linters or builds. However, allowing the internet to run arbitrary commands on the host machine is a recipe for disaster.

Instead, leaps allows you to specify pre-written commands using the -cmd flag, which are then available for clients to trigger asynchronously while they edit. Results are broadcast to all connected users, so you can all see the outcome as a team.

For example, leaps -cmd "golint ./..." -cmd "go build ./cmd/leaps" gives users both a linter and a build command that they can trigger on your machine.

API

Leaps can also be used as a library, with implementations of accessors for various document hosting solutions and plugable authentication layers, allowing you to build your own services to suit many service architectures.

Leaps server components are implemented in Golang, and has a client implemented in JavaScript that can currently be used with ACE, CodeMirror and Textarea editors.

To read more about the service library components and find examples check out the godocs.

To read about the JavaScript client check out the README.

Install

Leaps is a single binary, with no runtime dependencies. Just download a package for your OS from the latest releases page.

From homebrew

brew install leaps
leaps -h

Build with Go

go get github.com/Jeffail/leaps/cmd/...
leaps -h

System compatibility

OS Status
OSX x86_64 Supported, tested
Linux x86 Supported
Linux x86_64 Supported, tested
Linux ARMv5 Builds
Linux ARMv7 Supported, tested
Windows x86 Builds
Windows x86_64 Builds

Contributing and customizing

Contributions are very welcome, just fork and submit a pull request.

Contact

Ashley Jeffs * Web: http://jeffail.uk * Twitter: @Jeffail

Extension points exported contracts — how you extend this code

Authenticator (Interface)
* Authenticator - Implemented by types able to validate tokens for editing or creating documents. This is abstracted in [4 …
lib/acl/interface.go
Auditor (Interface)
------------------------------------------------------------------------------ Auditor - A type that receives all transf [2 …
lib/audit/interface.go
Emitter (Interface)
Emitter - To be instantiated for each connected client. Allows components to implement the leaps service API by register [2 …
lib/api/emitter.go
Portal (Interface)
------------------------------------------------------------------------------ Portal - An interface used by clients to [2 …
lib/binder/interface.go
AuditorContainer (Interface)
------------------------------------------------------------------------------ AuditorContainer - A type responsible for [1 …
lib/curator/interface.go
Modular (Interface)
*-------------------------------------------------------------------------------------------------- */ Modular - A log [1 …
lib/util/service/log/interface.go
Type (Interface)
-------------------------------------------------------------------------------------------------- * Type - Implemented
lib/store/interface.go
CMDRunner (Interface)
------------------------------------------------------------------------------ CMDRunner is a type that executes command [2 …
lib/api/cmd_broker.go

Core symbols most depended-on inside this repo

Errorf
called by 256
lib/util/service/log/interface.go
Error
called by 120
lib/api/events/error.go
Incr
called by 53
lib/util/service/metrics/interface.go
Subscribe
called by 26
lib/binder/interface.go
NewDocument
called by 20
lib/store/document.go
SendTransform
called by 19
lib/binder/interface.go
Close
called by 18
lib/util/service/metrics/interface.go
PushTransform
called by 17
lib/text/ot_buffer.go

Shape

Method 212
Function 201
Struct 86
Interface 14
FuncType 3
TypeAlias 2

Languages

Go85%
TypeScript15%

Modules by API surface

lib/api/common_test.go23 symbols
lib/util/service/log/logger.go22 symbols
lib/binder/binder_test.go21 symbols
lib/binder/interface.go20 symbols
cmd/leaps/www-ace/leapshare.js19 symbols
cmd/leaps/www-cm/js/leapshare.js18 symbols
lib/binder/binder.go16 symbols
lib/util/service/log/interface.go15 symbols
lib/curator/curator_test.go15 symbols
lib/util/service/metrics/riemann.go12 symbols
lib/api/io/json_emitter.go12 symbols
lib/api/events/events.go12 symbols

For agents

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

⬇ download graph artifact