{"id":13471903,"url":"https://github.com/snwfdhmp/duck","last_synced_at":"2025-06-10T17:33:36.982Z","repository":{"id":57591632,"uuid":"89849040","full_name":"snwfdhmp/duck","owner":"snwfdhmp","description":"Command snippet framework w/ repository (cloud \u0026 self hosted)","archived":false,"fork":false,"pushed_at":"2018-02-12T11:10:53.000Z","size":29277,"stargazers_count":40,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T07:12:18.800Z","etag":null,"topics":["automation","developer-tools","go","hackable","productivity","productivity-booster","productivity-tools","project-management","redundancy","snippets","speedup","tool"],"latest_commit_sha":null,"homepage":"https://github.com/snwfdhmp/duck","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snwfdhmp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-30T12:19:50.000Z","updated_at":"2024-08-29T10:12:21.000Z","dependencies_parsed_at":"2022-09-26T22:30:41.403Z","dependency_job_id":null,"html_url":"https://github.com/snwfdhmp/duck","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fduck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fduck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fduck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fduck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snwfdhmp","download_url":"https://codeload.github.com/snwfdhmp/duck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530572,"owners_count":21119600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","developer-tools","go","hackable","productivity","productivity-booster","productivity-tools","project-management","redundancy","snippets","speedup","tool"],"created_at":"2024-07-31T16:00:50.192Z","updated_at":"2025-04-12T07:12:25.559Z","avatar_url":"https://github.com/snwfdhmp.png","language":"Go","funding_links":[],"categories":["Go","automation","Repositories"],"sub_categories":[],"readme":"# Message from the developer\n\nAs duck is being rewritten, this documentation might contain incorrect informations. I will get it up to date asap.\n\n\u003c!-- ![head][head] --\u003e\n\n## Introduction\n\n[Duck]()![logo][logo-xs] is a **developer tool** which brings **abstraction** to the **terminal**.\n\n## Examples usage\n\n### C++ : compile\n\n\n#### before\n```\n$ g++ -o ./binary1.4.3 main.cpp Logger.cpp AnotherFile.cpp MyClass.cpp -lm -Wall\n```\n\n#### after\n\n```\n$ @ build\n```\n\n### Go : create packages\n\n#### before\n\n```\n$ mkdir myNewPackage\n$ touch myNewPackage/myNewPackage.go\n```\n\n#### after\n\n```\n$ @ pack myNewPackage\n```\n\n### git: add, commit, push\n\n#### before\n\n```\n$ git add *\n$ git commit -a -m \"My message\"\n$ git push origin master\n```\n\n#### after\n\n```\n$ @ gcp \"My message\"\n```\n\n## Dependencies\n\n| name | installation process |\n| --- | --- |\n| curl | `apt install curl` or `brew install curl` or whatever |\n| go | [official tutorial](https://golang.org/doc/install) |\n\n\n## Installation\n\n- Download the latest version of duck [here](https://github.com/snwfdhmp/duck/releases)\n\n- Move it into /usr/local/bin and name it `duck`\n\n- Run `ln -s /usr/local/bin/duck /usr/local/bin/@` to add `@` support\n\n- Download the `project.conf` in ressources/duck.conf (on the repo) and put it in /etc/duck/duck.conf\n\n- Start using duck !\n\n## One-line Installation\n\n\u003e Currently not available\n\nInstalling [duck]() from sources is a very **easy** step.\n\nOnce you have `curl` and `go` installed, just run :\n\n\u003e WARNING : Due to recent changes, this script is being rewritten. You can still install duck but not with the script.\n\n```bash\n$ curl https://raw.githubusercontent.com/snwfdhmp/duck/master/INSTALL.sh | bash\n```\n\nThis will download the installation script and execute it. Ensure to have sudo permissions.\n\n## Manual Installation\n\nThis will come later.\n\n## Usage\n\nduck is available under the alias `@` to speed up the command-writing process.\n\n\u003e if `@` is not available for you, run `ln -s $(which duck) /usr/local/bin/@`\n\nusage: `@ \u003caction\u003e [args]`\n\n| command | description |\n| --- | --- |\n| `@ init` | add duck to your project |  |\n| `@ install pkg` | download and install package pkg |\n| `@ lings` | view loaded lings |\n| `@ exec` | run your project |\n| `@ repo-list` | print a list of installed repositories |\n| `@ mkdir` | mkdir a directory if it doesn't exist |\n| `@ buid` | build your project |\n\nTo see the list of all available commands, type `@ help`\n\n## Getting started\n\n### Create a new directory for your projects\n\n```\n$ mkdir my-project\n$ cd my-project\n```\n### Init a duck repo in this directory\n\n```\n$ @ init\nName: tictactoe\nLang: go\nMain: game.go\n```\n\n### Install the packages you want\n\u003e see the official repo [here](https://github.com/snwfdhmp/duck-core) to discover packages\n\n```\n$ @ install snwfdhmp/std\n$ @ install snwfdhmp/go\n$ @ install snwfdhmp/cpp\n$ @ install snwfdhmp/junk\n```\n\n## Make a ling\n\n*Lings* are duck's **most interesting part**.\nThey are custom commands you build to avoid repeating commands.\n\nExamples :\n\n| This | Will execute |\n| --- | --- |\n| `@ pack MyPackage` | `mkdir MyPackage \u0026\u0026 touch MyPackage/MyPackage.go` |\n| `@ gcp \"My message\"` | `git add * \u0026\u0026 git commit -a -m \"My message\" \u0026\u0026 git push` |\n\n### Tags\n\nYou can use different $tags in a ling\n\n| Tag | Description | Example |\n| --- | --- | --- |\n| *$main* | Your project's main file | `main.go` |\n| *$name* | Your project's name | `myAwesomeProject` |\n| *$path* | Path to your project | `/home/snwfdhmp/my-project` |\n| *$1*, *$2*, ..., *$9* | Commands arguments (like in shell) | `@ create toto` =\u003e `mkdir toto \u0026\u0026 touch toto/toto.go` |\n\nExample lings using tags :\n\n| This | Will execute |\n| --- | --- |\n| `@ build` | `go build -o $path/$name` |\n| `@ junk fileToThrow.txt` | `mv fileToThrow.txt $path/.junk` |\n\n### Sample package\n\nPackages contain lings\n\nYou can build packages to import/export lings.\n\nCreate a file in YOURPROJECT/.duck/YOURNAME/PKGNAME.pkg\n\n\u003ccode\u003e.duck/pkg/snwfdhmp/go.pkg\u003c/code\u003e\n\n```json\n{\n\t\"Dependencies\":[],\n\t\"Lings\":[\n\t\t{\n\t\t\t\"Label\":\"build\",\n\t\t\t\"Description\":\"compile project\",\n\t\t\t\"Commands\":[\"go build -o $name $main\"],\n\t\t\t\"Aliases\":[\"b\"]\n\t\t},\n\t\t{\n\t\t\t\"Label\":\"pack\",\n\t\t\t\"Description\":\"create a new package\",\n\t\t\t\"Commands\":[\n\t\t\t\t\"mkdir $1\",\n\t\t\t\t\"touch $1/$1.go\"\n\t\t\t\t],\n\t\t\t\"Aliases\":[\"p\"]\n\t\t},\n\t\t{\n\t\t\t\"Label\":\"run\",\n\t\t\t\"Description\":\"go run your project\",\n\t\t\t\"Commands\":[\n\t\t\t\t\"go run $main\"\n\t\t\t\t],\n\t\t\t\"Aliases\":[\"r\"]\n\t\t}\n\t]\n}\n```\n\n\n## Contributing\n\nDuck is currently closed to contributions.\n\nHowever, please feel free to open issues.\n\n## Author\n\n- [snwfdhmp](http://github.com/snwfdhmp) (I'm currently the only one on this project.)\n\n## Thanks to\n\n- [GoReleaser](https://github.com/goreleaser/goreleaser) used for releases management\n\n\n[logo-xs]: ressources/logo-xs.png \"Logo\"\n[head]: https://www.github.com/snwfdhmp/duck/raw/master/doc/ressources/img/head.png \"Head\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnwfdhmp%2Fduck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnwfdhmp%2Fduck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnwfdhmp%2Fduck/lists"}