to create a torrent from a file:
transmissioncli -n myfile -c "Some comment" -a http://tracker.url/announce myfile.torrent
where -n myfile argument is the path to the file;
-a http://tracker.url/announce is the tracker you will need to use in order to properly transfer files;
myfile.torrent is the file the program will create. you can specify a path or it will put it in current directory;
to create a torrent from a directory:
transmissioncli -n mydir/ -c "Some comment" -a http://tracker.url/announce mydir.torrent
the arguments are the same as the command for files above.
After you have the .torrent file made by transmissioncli, you will need to add it for seeding.
sudo transmission-remote -a mydir.torrent -t daemon -f /home/your_username/download
where mydir.torrent is the torrent file for the torrent we just made; /home/your_username/download is the folder where it will download/seed, the files must be in the same folder in order to seed the files.
Resources: ubuntu manpages, ubuntu forums