{"id":13439075,"url":"https://github.com/solusipse/fiche","last_synced_at":"2025-04-08T09:09:28.923Z","repository":{"id":10461152,"uuid":"12633603","full_name":"solusipse/fiche","owner":"solusipse","description":"Command line pastebin for sharing terminal output.","archived":false,"fork":false,"pushed_at":"2023-07-14T08:03:29.000Z","size":113,"stargazers_count":1442,"open_issues_count":34,"forks_count":172,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-04-01T07:53:01.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://termbin.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solusipse.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,"governance":null}},"created_at":"2013-09-06T01:59:56.000Z","updated_at":"2025-03-10T23:26:34.000Z","dependencies_parsed_at":"2022-08-07T05:15:48.203Z","dependency_job_id":"d4ded4f4-2c56-4fad-b4ed-45b4891aaf73","html_url":"https://github.com/solusipse/fiche","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solusipse%2Ffiche","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solusipse%2Ffiche/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solusipse%2Ffiche/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solusipse%2Ffiche/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solusipse","download_url":"https://codeload.github.com/solusipse/fiche/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809964,"owners_count":20999816,"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":[],"created_at":"2024-07-31T03:01:10.915Z","updated_at":"2025-04-08T09:09:28.895Z","avatar_url":"https://github.com/solusipse.png","language":"C","funding_links":[],"categories":["C","Install from Source","C (61)","Software","HarmonyOS","others","Apps","Pastebins"],"sub_categories":["Pastebins","Windows Manager","FileSharing","Video Streaming"],"readme":"fiche [![Build Status](https://travis-ci.org/solusipse/fiche.svg?branch=master)](https://travis-ci.org/solusipse/fiche)\n=====\n\nCommand line pastebin for sharing terminal output.\n\n# Client-side usage\n\nSelf-explanatory live examples (using public server):\n\n```\necho just testing! | nc termbin.com 9999\n```\n\n```\ncat file.txt | nc termbin.com 9999\n```\n\nIn case you installed and started fiche on localhost:\n\n```\nls -la | nc localhost 9999\n```\n\nYou will get an url to your paste as a response, e.g.:\n\n```\nhttp://termbin.com/ydxh\n```\n\nYou can use our beautification service to get any paste colored and numbered. Just ask for it using `l.termbin.com` subdomain, e.g.:\n\n```\nhttp://l.termbin.com/ydxh\n```\n\n-------------------------------------------------------------------------------\n\n## Useful aliases\n\nYou can make your life easier by adding a termbin alias to your rc file. We list some of them here:\n\n-------------------------------------------------------------------------------\n\n### Pure-bash alternative to netcat\n\n__Linux/macOS:__\n```\nalias tb=\"(exec 3\u003c\u003e/dev/tcp/termbin.com/9999; cat \u003e\u00263; cat \u003c\u00263; exec 3\u003c\u0026-)\"\n```\n\n```\necho less typing now! | tb\n```\n\n_See [#42](https://github.com/solusipse/fiche/issues/42), [#43](https://github.com/solusipse/fiche/issues/43) for more info._\n\n-------------------------------------------------------------------------------\n\n### `tb` alias\n\n__Linux (Bash):__\n```\necho 'alias tb=\"nc termbin.com 9999\"' \u003e\u003e .bashrc\n```\n\n```\necho less typing now! | tb\n```\n\n__macOS:__\n\n```\necho 'alias tb=\"nc termbin.com 9999\"' \u003e\u003e .bash_profile\n```\n\n```\necho less typing now! | tb\n```\n\n-------------------------------------------------------------------------------\n\n### Copy output to clipboard\n\n__Linux (Bash):__\n```\necho 'alias tbc=\"netcat termbin.com 9999 | xclip -selection c\"' \u003e\u003e .bashrc\n```\n\n```\necho less typing now! | tbc\n```\n\n__macOS:__\n\n```\necho 'alias tbc=\"nc termbin.com 9999 | pbcopy\"' \u003e\u003e .bash_profile\n```\n\n```\necho less typing now! | tbc\n```\n\n__Remember__ to reload the shell with `source ~/.bashrc` or `source ~/.bash_profile` after adding any of provided above!\n\n-------------------------------------------------------------------------------\n\n## Requirements\nTo use fiche you have to have netcat installed. You probably already have it - try typing `nc` or `netcat` into your terminal!\n\n-------------------------------------------------------------------------------\n\n# Server-side usage\n\n## Installation\n\n1. Clone:\n\n    ```\n    git clone https://github.com/solusipse/fiche.git\n    ```\n\n2. Build:\n\n    ```\n    make\n    ```\n    \n3. Install:\n\n    ```\n    sudo make install\n    ```\n\n### Using Ports on FreeBSD\n\nTo install the port: `cd /usr/ports/net/fiche/ \u0026\u0026 make install clean`. To add the package: `pkg install fiche`.\n\n_See [#86](https://github.com/solusipse/fiche/issues/86) for more info._\n\n-------------------------------------------------------------------------------\n\n## Usage\n\n```\nusage: fiche [-D6epbsdSolBuw].\n             [-d domain] [-L listen_addr ] [-p port] [-s slug size]\n             [-o output directory] [-B buffer size] [-u user name]\n             [-l log file] [-b banlist] [-w whitelist] [-S]\n```\n\nThese are command line arguments. You don't have to provide any of them to run the application. Default settings will be used in such case. See section below for more info.\n\n### Settings\n\n-------------------------------------------------------------------------------\n\n#### Output directory `-o`\n\nRelative or absolute path to the directory where you want to store user-posted pastes.\n\n```\nfiche -o ./code\n```\n\n```\nfiche -o /home/www/code/\n```\n\n__Default value:__ `./code`\n\n-------------------------------------------------------------------------------\n\n#### Domain `-d`\n\nThis will be used as a prefix for an output received by the client.\nValue will be prepended with `http`.\n\n```\nfiche -d domain.com\n```\n\n```\nfiche -d subdomain.domain.com\n```\n\n```\nfiche -d subdomain.domain.com/some_directory\n```\n\n__Default value:__ `localhost`\n\n-------------------------------------------------------------------------------\n\n#### Slug size `-s`\n\nThis will force slugs to be of required length:\n\n```\nfiche -s 6\n```\n\n__Output url with default value__: `http://localhost/xxxx`,\nwhere x is a randomized character\n\n__Output url with example value 6__: `http://localhost/xxxxxx`,\nwhere x is a randomized character\n\n__Default value:__ 4\n\n-------------------------------------------------------------------------------\n\n#### HTTPS `-S`\n\nIf set, fiche returns url with https prefix instead of http\n\n```\nfiche -S\n```\n\n__Output url with this parameter__: `https://localhost/xxxx`,\nwhere x is a randomized character\n\n-------------------------------------------------------------------------------\n\n#### User name `-u`\n\nFiche will try to switch to the requested user on startup if any is provided.\n\n```\nfiche -u _fiche\n```\n\n__Default value:__ not set\n\n__WARNING:__ This requires that fiche is started as a root.\n\n-------------------------------------------------------------------------------\n\n#### Buffer size `-B`\n\nThis parameter defines size of the buffer used for getting data from the user.\nMaximum size (in bytes) of all input files is defined by this value.\n\n```\nfiche -B 2048\n```\n\n__Default value:__ 32768\n\n-------------------------------------------------------------------------------\n\n#### Log file `-l`\n\n```\nfiche -l /home/www/fiche-log.txt\n```\n\n__Default value:__ not set\n\n__WARNING:__ this file has to be user-writable\n\n-------------------------------------------------------------------------------\n\n#### Ban list `-b`\n\nRelative or absolute path to a file containing IP addresses of banned users.\n\n```\nfiche -b fiche-bans.txt\n```\n\n__Format of the file:__ this file should contain only addresses, one per line.\n\n__Default value:__ not set\n\n__WARNING:__ not implemented yet\n\n-------------------------------------------------------------------------------\n\n#### White list `-w`\n\nIf whitelist mode is enabled, only addresses from the list will be able\nto upload files.\n\n```\nfiche -w fiche-whitelist.txt\n```\n\n__Format of the file:__ this file should contain only addresses, one per line.\n\n__Default value:__ not set\n\n__WARNING:__ not implemented yet\n\n-------------------------------------------------------------------------------\n\n### Running as a service\n\nThere's a simple systemd example:\n```\n[Unit]\nDescription=FICHE-SERVER\n\n[Service]\nExecStart=/usr/local/bin/fiche -d yourdomain.com -o /path/to/output -l /path/to/log -u youruser\n\n[Install]\nWantedBy=multi-user.target\n```\n\n__WARNING:__ In service mode you have to set output directory with `-o` parameter.\n\n-------------------------------------------------------------------------------\n\n### Example nginx config\n\nFiche has no http server built-in, thus you need to setup one if you want to make files available through http.\n\nThere's a sample configuration for nginx:\n\n```\nserver {\n    listen 80;\n    server_name mysite.com www.mysite.com;\n    charset utf-8;\n\n    location / {\n            root /home/www/code/;\n            index index.txt index.html;\n    }\n}\n```\n\n## License\n\nFiche is MIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolusipse%2Ffiche","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolusipse%2Ffiche","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolusipse%2Ffiche/lists"}