Skip to content

victorabarros/TermGIFforge

Repository files navigation

TermGIFforge 👾

Go Report Card GitHub License

A hosted micro‑SaaS (HTTP API) to render terminal GIFs on demand. Give it a list of VHS commands → get back a GIF you can embed in docs, READMEs, or share anywhere.

No library to install. No client SDK required. Just call the endpoint (GET with commands=[...] or POST JSON) and use the returned image.

Use this API to present your CLI workflows as polished, shareable GIFs.

Table of Contents

Instructions

TermGIFforge uses the VHS to generate the GIFs, here you'll find the command references to generate your own GIFs. Try:

  • Having the commands on query param, like:
    • http://terminalgifapi.com/api/v1/gif?commands=["Type \"echo 'The Magic Happens Here'\"","Enter","Sleep 2s"]
    • http://terminalgifapi.com/api/v1/gif?commands=[ "Set FontSize 50", "Set TypingSpeed 75ms", "Type \"echo \"", "Set TypingSpeed 500ms", "Type \"'YEY\"", "Set TypingSpeed 75ms", "Type \"!!!'\"", "Sleep 100ms", "Enter", "Sleep 2s"]
    • http://terminalgifapi.com/api/v1/gif?commands=["Type \"echo 'Welcome to VHS!'\"","Enter","Type \"ls\"","Sleep 100ms","Enter","Sleep 2s"]
  • Sometimes using the commands on the query param can be tricky with the encoding. For these cases, you can have the commands on the requesst body, like:
    • curl -X POST http://terminalgifapi.com/api/v1/gif --header 'content-type: application/json' --data '{"commands": ["Type \"echo '\''Welcome t00 V0HS!'\''\"","Enter","Type \"ls\"","Sleep 100ms","Enter","Sleep 2s"]}'
  • Using the GIF id on the route param:
    • http://terminalgifapi/api/v1/gif/33613662-3838-3532-3532-313636613838

How to run

Locally w/ docker 🐳

Then, from browser or Bruno, open:

Troubleshooting

  • How to encode the URL to use in the HTML tag?
    • Simply enter your URL to the browser and it'll parse it to you.
    • If you're using some special characters, like "#", use the urlencoder.org for the query params and it should work.
  • How to force image (cache) update in README.rst on GitHub?
    • You have to delete the cache by run curl -X PURGE {url of cached badge image} and refresh the page (reference).

Contributing

Contributions are welcome! Feel free to open issues or fork the repo and submit pull requests to enhance the project.

Support





References



Made in Brazil

About

Your Commands, Captured in Motion. On-the-Fly Terminal GIF Effortlessly Generation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors